Full_Name: Allyson Williams
Version: 2.1.1
OS: Windows XP
Submission from: (NULL) (203.25.1.208)
I'm using the 'Circular' package to plot windroses. I think the output table
(see out2$table below) is incorrect when using different rotations. More
precisely, when a rotation is used for the plot, the output table stuffs up.
This example is from the code in the help notes, although the input data (dir,
mag) are changed):
dir <- c(1:50,1:50)
mag <- c(1:100)
sample <- data.frame(dir=circular(dir,units="degrees"), mag=mag)
par(mfrow=c(2,2))
res <- windrose(sample)
## we join two pedals and keep the same shrink (scale of the plot)
breaks <- seq(0, 2 * pi, by = pi/6)
breaks <- breaks[-2]
out1<-windrose(sample, breaks=breaks, increment=50,main="The same but with two
pedals joined", shrink=res$shrink)
#
# change the rotation
sample <- data.frame(dir=circular(dir, units="degrees", rotation="clock"),
mag=mag)
out2<-windrose(sample, breaks=breaks,increment=50, main="Change the rotation",
shrink=res$shrink)
## use geographics template
sample <- data.frame(dir=circular(dir, units="degrees",
template="geographics"), mag=mag)
out3<-windrose(sample, breaks=breaks, increment=50,main="Use the template
'geographics'", shrink=res$shrink)
THESE are the output tables that seem to be incorrect (I'm sorry they're not
clearer):
out1$table is correct. The data is all between 0-60degrees.
out2$table (changed rotation) is incorrect. The data are listed as being between
330-360degrees.
Out3$table (geographic rotation) is incorrect. The data are listed as being
between 60-90degrees.
Regardless of the rotation, the data should always be between 0-60degrees!
The problem only seems to occur when 'rotating' the plot.