[R] rosavent problem
David Winsemius
dwinsemius at comcast.net
Sun Apr 18 07:06:27 CEST 2010
On Apr 17, 2010, at 11:04 PM, Kevin Turner wrote:
> I have a frequency table that I am trying to plot on a rose diagram
> using
> rosavent. I've set the table up by using this line:
>
> Wind_freq_speed <- t(table(cut(Wind_Dir_vec, 0:36),
> cut(Wind_Speed_vec,
> seq(0, to=60, by=10))))
>
> It produces the following table layout, which is consistent with the
> rosavent example (windfreq.dat).
>
> 10 20 30 40 50 60 70... 360
> 0-10
> 10-20
> 20-30
> 30-40
> 40-50
> 50-60
>
> However, when I use the rosavent command (i.e.
> rosavent(Wind_freq_speed)),
> it produces a rose diagram with my data plotted 6 times around the 360
> degrees. I also get the following error:
>
> Error in legend(-fmaxi - 2 * fint, fmaxi, fill = col, legend =
> attr(frec, :
> 'legend' is of length 0
If you indicated what package that function was from, then I missed
it. The thought did occur to me that maybe it was expecting arguments
in radians since 2*pi is fairly close to 6.
--
David
>
> Can anyone help me with this?
>
> Thanks.
>
> --
> Kevin Turner
> Department of Geography
> and Environmental Studies
> Wilfrid Laurier University
> Waterloo, Ontario
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list