I want to plot a wind rose in R. I'm trying with the package "openair". My database is in degrees/10 (within 0 and 36), if I plot this values (but it doesn't make sense), it works. But if i real degrees (degrees*10) it says:
Error in e2[[j]] : out of limits (What is it?)
My code is:
windRose(meteo, ws = "Int Viento [Nudos]", wd = "Dir Viento", ws2 = NA, wd2 = NA,
ws.int = 3, angle = 3, type = "default", bias.corr = TRUE, cols= "default",
grid.line = NULL, width = 1, seg = NULL, auto.text= TRUE,
offset = 0, normalise = FALSE, max.freq =NULL,
paddle = FALSE, key.header = NULL, key.footer = "Nudos",
key.position = "bottom", key = TRUE, dig.lab = 5, statistic = "prop.count",
pollutant = NULL, annotate = TRUE, border = NA)
I tried with the example database of Openair, and it works:
windRose(mydata, ws = "ws", wd = "wd", ws2 = NA, wd2 = NA,
ws.int = 2, angle = 30, type = "default", bias.corr = TRUE, cols
= "default", grid.line = NULL, width = 1, seg = NULL, auto.text
= TRUE, breaks = 4, offset = 10, normalise = FALSE, max.freq =
NULL, paddle = TRUE, key.header = NULL, key.footer = "(m/s)",
key.position = "bottom", key = TRUE, dig.lab = 5, statistic =
"prop.count", pollutant = NULL, annotate = TRUE, angle.scale =
360, border = NA)
To compare both:
summary(mydata$wd)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0 140 210 200 270 360 219
summary(meteo$`Dir Viento`)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.0 90.0 140.0 175.5 270.0 360.0 43
traceback()
andoptions(error=recover)
– IRTFM