rose(x, ...)
"rose"(x, breaks = NULL, ..., weights=NULL, nclass = NULL, unit = c("degree", "radian"), start=0, clockwise=FALSE, main)
"rose"(x, ..., unit = c("degree", "radian"), start=0, clockwise=FALSE, main, labels=TRUE, at=NULL, do.plot = TRUE)
"rose"(x, ..., unit = c("degree", "radian"), start=0, clockwise=FALSE, main, labels=TRUE, at=NULL, do.plot = TRUE)
"rose"(x, ..., unit = c("degree", "radian"), start=0, clockwise=FALSE, main, labels=TRUE, at=NULL, do.plot = TRUE)
histogram
object containing a histogram of
angular values, or a density
object containing a
smooth density estimate for angular data,
or an fv
object giving a function
of an angular argument.
hist
to determine
the histogram breakpoints.
"N"
for north, "S"
for south, "E"
for east,
or "W"
for west) or a number giving the angle from the
the horizontal (East) axis to the starting direction. For example,
if unit="degree"
and clockwise=FALSE
,
then start=90
and start="N"
are equivalent.
The default is to measure angles anti-clockwise from the
horizontal axis (East direction).
clockwise=TRUE
) or anti-clockwise,
counter-clockwise direction (clockwise=FALSE
, the default).
x
.
at=numeric(0)
to suppress tick marks.
"owin"
) containing the plotted region. The function rose
is generic, with a default method
for numeric data, and methods for histograms and function tables.
If x
is a numeric vector, it must contain angular values
in the range 0 to 360 (if unit="degree"
)
or in the range 0 to 2 * pi
(if unit="radian"
).
A histogram of the data will first be computed using
hist
. Then the rose diagram of this histogram
will be plotted by rose.histogram
.
If x
is an object of class "histogram"
produced by
the function hist
, representing the histogram
of angular data, then the rose diagram of the densities
(rather than the counts) in this histogram object will be plotted.
If x
is an object of class "density"
produced by
circdensity
or density.default
,
representing a kernel smoothed density estimate of angular data,
then the rose diagram of the density estimate will be plotted.
If x
is a function value table (object of class "fv"
)
then the argument of the function will be interpreted as an angle,
and the value of the function will be interpreted as the radius.
By default, angles are interpreted using the mathematical convention
where the zero angle is the horizontal $x$ axis, and angles
increase anti-clockwise. Other conventions can be specified
using the arguments start
and clockwise
.
Standard compass directions are obtained by setting unit="degree"
,
start="N"
and clockwise=TRUE
.
fv
, hist
,
circdensity
,
density.default
.
ang <- runif(1000, max=360)
rose(ang, col="grey")
rose(ang, col="grey", start="N", clockwise=TRUE)
Run the code above in your browser using DataLab