Hello,
I'm trying to make a table like windfreq.dat in the rose diagram example of
the climatol package.
It looks like:
N NNE NE ENE E ESE SE SSE S SSW SW WSW W
WNW NW NNW
0-3 59 48 75 90 71 15 10 11 14 20 22
22 24 15 19 33
3-6 3 6 29 42 11 3 4 3 9 50
67 28 14 13 15 5
6-9 1 3 16 17 2 0 0 0 2 16
33 17 6 5 9 2
"> 9" 0 1 2 3 0 0 0 0 0
1 4 3 1 1 2 0
Each row is the number of observations for a given wind direction (i.e. N,
NNE, NE, etc.) is within the limits of the specified speed (i.e. 0-3, 3-6,
etc.).
I have a table with 2 fields - *direction values* (0-36, which represents
the direction/10) and *speed values*.
I can use the direction values to get a 1-dimensional array of the frequency
of each direction value using:
Wind_freq <- table(cut(Wind_Dir_vec, 0:36))
Wind_freq_t <- t(Wind_freq) ## transpose it to be in the same format as
the data above
but I need to incorporate the speed values and have a table like the
following:
1 2 3 4 5 6 .... 36
0-9
10-19
20-29
30-39
40-49
50+
The final table will be used in the rosavent function to produce a wind rose
diagram just like in this example:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=123
Anyone have any ideas. Thanks.
--
Kevin Turner
Department of Geography
and Environmental Studies
Wilfrid Laurier University
Waterloo, Ontario
[[alternative HTML version deleted]]