> 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:
The table() command will accept an arbitrary number of factors as its first arguments, and cross tabulate the frequencies for all of them. So table(cut(Wind_Dir_vec, 0:36), cut(Wind_Speed, seq(9.5, to=49.5, by=10))) should do more or less what you want. > -- > Kevin Turner > Department of Geography > and Environmental Studies > Wilfrid Laurier University > Waterloo, Ontario > [[alternative HTML version deleted]] -- Robin Evans Statistics Department University of Washington www.stat.washington.edu/~rje42 ______________________________________________ R-help@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.