Learn R Programming

oce (version 1.7-8)

as.windrose: Create a Windrose Object

Description

Create a wind-rose object, typically for plotting with plot,windrose-method().

Usage

as.windrose(x, y, dtheta = 15, debug = getOption("oceDebug"))

Value

A windrose object, with data slot containing

ItemMeaning
nthe number of x values
x.meanthe mean of the x values
y.meanthe mean of the y values
thetathe central angle (in degrees) for the class
countthe number of observations in this class
meanthe mean of the observations in this class
fivenumthe fivenum() vector for observations in this class (the min, the lower hinge, the median, the upper hinge, and the max)

Arguments

x

The x component of wind speed (or stress) or an object of class met (see met), in which case the u and v components of that object are used for the components of wind speed, and y here is ignored.

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.

Author

Dan Kelley, with considerable help from Alex Deckmyn.

See Also

Other things related to windrose data: [[,windrose-method, [[<-,windrose-method, plot,windrose-method, summary,windrose-method, windrose-class

Examples

Run this code
library(oce)
xcomp <- rnorm(360) + 1
ycomp <- rnorm(360)
wr <- as.windrose(xcomp, ycomp)
summary(wr)
plot(wr)

Run the code above in your browser using DataLab