lsfit.circle(x, y, init = NULL, units = c("radians", "degrees"),
template = c("none", "geographics"),
modulo = c("asis", "2pi", "pi"), zero = 0, rotation = c("counter", "clock"), ...)
## S3 method for class 'lsfit.circle':
print(x, digits = max(3, getOption("digits") - 3), ...)x is a vector then y must be a vector with the same length.NULL the vector is set
to c(max(c(abs(x-mean(x)), abs(y-meanunits used in defining the angles between
observations and the center of the circle. See circular.template used in defining the angles between
observations and the center of the circle. See circular.modulo used in defining the angles between
observations and the center of the circle. See circular.zero used in defining the angles between
observations and the center of the circle. See circular.rotation used in defining the angles between
observations and the center of the circle. See circular.optim function.lsfit.circle.lsfit.circle uses the optim function to minimize the sum of the
squared residuals between the observations and the optimally fitting circle.data(coope)
res <- lsfit.circle(x=x.coope, y=y.coope)
res
plot(res)
par(mfcol=c(1,2))
plot(res$angles)
hist(res$radius)
windrose(x=res$angles, y=res$radius)Run the code above in your browser using DataLab