Topic: Utilities
Topic Description:
Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.
File: utilities/geometry.r
| View File Source | Download File | No help file available |
Function: fullellipse
Function Description: fullellipse
Creates a dataframe for a full ellipse.Function Arguments:
| Argument | Default Value |
|---|---|
| x | |
| center | c(0,0) |
| radius | c(7,5) |
Function Source:
fullellipse=function(x,center=c(0,0),radius=c(7,5))
{
tophalf=ellipse(x,center,radius,half='top')
bottomhalf=ellipse(x,center,radius,half='bottom')
result=data.frame(x=c(x,NA,x),y=c(tophalf,NA,bottomhalf))
return(result)
}
{
tophalf=ellipse(x,center,radius,half='top')
bottomhalf=ellipse(x,center,radius,half='bottom')
result=data.frame(x=c(x,NA,x),y=c(tophalf,NA,bottomhalf))
return(result)
}