我想在 R 中绘制风玫瑰图。我正在尝试使用“openair”包。我的数据库是度数/10(在 0 和 36 之间),如果我绘制这个值(但它没有意义),它就可以工作。但如果我是真正的度数(度数 * 10),它会说:
e2[[j]] 中的错误:超出限制(它是什么?)
我的代码是:
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)
我尝试使用 Openair 的示例数据库,它可以工作:
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)
比较两者:
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