I keep getting this error when using my made up dataset. I am trying to fix this, so that I can ask another question latter.
#> Error in `[[<-.data.frame`(`*tmp*`, vars[i], value = numeric(0)): replacement has 0 rows, data has 11
I don't get this error when I use longer dataset.
Below is what I have so far, any suggestions?
library (openair)
library (tidyverse)
wind_rose <- data.frame("wind_speed(m/s)" = c(4.31, 6.73, 8.95, 6.68, 6.92, 7.14,1.11,2.34,6.07,5.06,4.11),
"wind_direction(°)" = c(180,277,300,266,176,45,77,320,55,183,90))
windRose(wind_rose, ws="wind_speed(m/s)", wd="wind_direction(°)",
breaks=c(0,2,5,8,11,17),
auto.text = FALSE,
paddle = FALSE,
annotate = FALSE,
grid.line = 2,
key = list(labels = c( "> 0 - 2 ",
" > 2 - 5 ",
" > 5 - 8")),
theme(text = element_text(family = "Times")),
key.footer = "Avg. Wind Speed Lake George Station (Ocala, Fl) 2006-2019 WSP (m/s)",
key.position = "bottom",
par.settings = list(axis.line = list(col = "lightgray")),
par.settings = list(fontsize=list(text=1000)),
col = c("#A9A9A9", "#696969", "#363434"))
#> Error in `[[<-.data.frame`(`*tmp*`, vars[i], value = numeric(0)): replacement has 0 rows, data has 11