Learn R Programming

oce (version 0.9-18)

as.windrose: Create a windrose object

Description

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

Usage

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

Arguments

x
the x component of wind speed (or stress) or an object of class met (see met-class), in which case the u and v components of that object are use
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.

Value

  • An object of class "windrose", which contains the standard oce slots named data, metadata and proxessingLog. The data slot contains [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Details

This is analagous to a histogram, but with breaks being angles.

See Also

Use plot.windrose to produce a summary plot, and summary.windrose to produce a numerical summary.

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