| circular | R Documentation | 
The function circular is used to create circular objects. as.circular and is.circular coerce an object to a circular and  test whether an object is a circular data.
circular(x, type = c("angles", "directions"), 
  units = c("radians", "degrees", "hours"),
  template = c("none", "geographics", "clock12", "clock24"),
  modulo = c("asis", "2pi", "pi"), 
  zero = 0, rotation = c("counter", "clock"), names)
## S3 method for class 'circular'
as(x, control.circular=list(), ...)
## S3 method for class 'circular'
is(x)
## S3 method for class 'circular'
print(x, info=TRUE, ...)
x | 
 a vector or a matrix. If a data.frame is supply then it is coerced to a matrix.  | 
type | 
 the type of measures (Not Used Yet).  | 
units | 
 units of the measures.  | 
template | 
 how the data should be plotted. This set   | 
modulo | 
 if we need to reduce the measures to modulo.  | 
zero | 
 the zero of the axes (in radians, counter).  | 
rotation | 
 the orientation of the axes.  | 
names | 
 names of the data.  | 
info | 
 if   | 
control.circular | 
 the attribute (coordinate system) used to coerced the resulting objects. See   | 
... | 
 For   | 
an object of class circular. Since version 0.3-5 the previous class of the object is retain.
Claudio Agostinelli
conversion.circular
x <- circular(c(pi, pi/3, pi/4))
print(x)
is.circular(x)
x <- circular(runif(10, -pi/2, pi/2), template="geographics")
plot(x)
class(x)
x <- circular(data.frame(runif(10, -pi/2, pi/2)))
plot(x)
class(x)
cbind(x, x) # the matrix, cbind, rbind functions unclass and lost attributes! 
########Use it with care.
x <- c(pi/12,2*pi+pi/12)
print(x)
x <- unique(x)
print(x)
x[1]==x[2]
all.equal(x[1], x[2])
x <- as.circular(pi, control.circular=list(units="radians", zero=pi))
y <- conversion.circular(circular(pi), zero=pi)
res <- plot(x)
points(y, col=2, plot.info=res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.