[R] rosavent problem
Joshua Wiley
jwiley.psych at gmail.com
Sun Apr 18 20:49:10 CEST 2010
I am wondering if there is a pattern in the rest of your data. I made
a table based on the data you provided, using 0s for degrees 80-350,
and it plots fine. If your data only changed slightly from section to
section (lets say by 4 or 5) it might be hard to tell that it is
actually different on the graph. You could also try
rosavent(yourdata, fint=1) ## this just blows up the graph and might
make it easier to see small differences.
Josh
On Sun, Apr 18, 2010 at 5:37 AM, Kevin Turner <turner.kw at gmail.com> wrote:
> The package is climatol.
>
> The data I'm working with looks like the following
>
> 10 20 30 40 50 60 70..... 360
> 0-10 159 241 386 495 599 821 874....153
> 10-20 96 481 815 1223 1165 856 529......31
> 20-30 77 387 640 740 341 104 4........5
> 30-40 28 130 223 383 65 4 0........0
> 40-50 6 15 30 64 2 0 0........0
> 50-60 0 0 1 2 0 0 0........0
>
> Each value is the number of times that the specified wind speed (0-10,
> 10-20....etc.) was coming from the corresponding angle (separated by
> columns).
>
> For some reason, all of the data is plotted six times around the 360
> degrees, so it looks like some kind of star. The data was originally from
> to vectors of wind speed and direction and was put into this table. I'll
> try it with other data sets to see if I can reproduce my problems.
>
> Thanks,
> Kevin
>
>
>
> On Sun, Apr 18, 2010 at 1:29 AM, Joshua Wiley <jwiley.psych at gmail.com>wrote:
>
>> On Sat, Apr 17, 2010 at 8:04 PM, Kevin Turner <turner.kw at gmail.com> 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))))
>>
>> We do not have this data...
>>
>> >
>> > It produces the following table layout, which is consistent with the
>> > rosavent example (windfreq.dat).
>>
>> When I call rosavent(windfreq.dat), it plots fine. It would help if
>> you could provide some sample data that reproduces your problem.
>>
>> For anyone else replying (David), the package is "climatol".
>>
>> --
>> Josh
>>
>>
>> >
>> > 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
>> >
>> > 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.
>> >
>>
>>
>>
>> --
>> Joshua Wiley
>> Senior in Psychology
>> University of California, Riverside
>> http://www.joshuawiley.com/
>>
>
>
>
> --
> 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.
>
--
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/
More information about the R-help
mailing list