1 year ago
#376650
Dana
Equal frequency binning for circular data in R
I am trying to divide my wind direction data into four equal frequency bins, without having a fixed break at 0° / 360°.
I am aware of the equal_freq()
function from the funModeling package, but this function does not take the circular nature of the wind data into account and calculates the breaks by starting at 0° and ending at 360°.
Is there a way to calculate dynamic equal frequencies that can span over the null jump between 0 and 360 degrees?
Here is a minimal reproducible example:
wind_dirs<-runif(n=2000, min=0, max=360) #create a homogenous wind direction distribution
equal_freq(wind_dirs, 4) #this has a fixed break at 0° / 360°
I tried the circular package in R, but there is no function for equal frequency binning. I also considered manually defining a breakpoint, e.g. the most prevailing direction, but this creates about the same problem as a break at 0°.
Any ideas are greatly appreciated.
r
frequency
circular-dependency
binning
degrees
0 Answers
Your Answer