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:

ArgumentDefault Value
x
centerc(0,0)
radiusc(7,5)

Arguments Description:

  • x = input x coordinates
  • center = x-y coordinates of ellipse center (vector of 2)


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)
}