I am trying to plot Windrose using package openair. I have used a simple code and i am getting the error "Subscript out of bound". I couldn't figure out what the error means. Here, Obs_WR
is my data and ws
and wd
are the column names for wind speed and wind direction respectively.
windRose(Obs_WR, ws="ws", wd="wd")
Error in mydata[[wd]] : subscript out of bounds
A part of dataframe is as follows :
> Obs_WR
ws wd
[1,] 3.715714 0.1250627
[2,] 4.491868 351.4789611
[3,] 5.312253 346.4029396
[4,] 6.047143 349.8645344
[5,] 6.071389 329.2137482
.... ........ ...........
[38,] 16.589769 274.0356269
[39,] 8.065556 273.2977654
[40,] 7.953387 130.6359338