as.windrose | R Documentation |
Create a wind-rose object, typically for plotting with
plot,windrose-method()
.
as.windrose(x, y, dtheta = 15, debug = getOption("oceDebug"))
x |
The x component of wind speed (or stress) or an object of class
|
y |
The y component of wind speed (or stress). |
dtheta |
The angle increment (in degrees) within which to classify the data. |
debug |
A flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more. |
A windrose object, with data
slot containing
Item | Meaning |
n | the number of x values |
x.mean | the mean of the x values |
y.mean | the mean of the y values |
theta | the central angle (in degrees) for the class |
count | the number of observations in this class |
mean | the mean of the observations in this class |
fivenum | the fivenum() vector for
observations in this class (the min, the lower hinge, the
median, the upper hinge, and the max) |
Dan Kelley, with considerable help from Alex Deckmyn.
Other things related to windrose data:
[[,windrose-method
,
[[<-,windrose-method
,
plot,windrose-method
,
summary,windrose-method
,
windrose-class
library(oce)
set.seed(1234)
theta <- seq(0, 360, 0.25)
x <- 1 + cos(pi / 180 * theta) + rnorm(theta)
y <- sin(pi / 180 * theta) + rnorm(theta)
wr <- as.windrose(x, y)
summary(wr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.