# basic wind frequency plot
polarFreq(mydata)
# wind frequencies by year
polarFreq(mydata, type = "year")
# drop the date strip at the top
polarFreq(mydata, strip = FALSE)
# mean SO2 by year, showing only bins with at least 2 points
polarFreq(mydata, pollutant = "so2", type = "year", statistic = "mean", min.bin = 2)
# weighted mean SO2 by year, showing only bins with at least 2 points
polarFreq(mydata, pollutant = "so2", type = "year", statistic = "weighted.mean", min.bin = 2)
#windRose for just 2000 and 2003 with different colours
polarFreq(subset(mydata, format(date, "%Y") %in% c(2000, 2003)), type = "year", cols = "jet")
# user defined breaks from 0-700 in intervals of 100 (note linear scale)
polarFreq(mydata, breaks = seq(0, 700, 100))
# more complicated user-defined breaks - useful for highlighting bins with a certain number of data points
polarFreq(mydata, breaks = c(0, 10, 50, 100, 250, 500, 700))
Run the code above in your browser using DataLab