## Load the data
data(fluxes)
## Split the wind data into 20 classes
fluxes$wind_class<-cut(fluxes$wind_dir,breaks=seq(0,365,20))
## Find the midpoint of each wind class
fluxes$wind_mid_points<-midpoints(fluxes$wind_class)
Run the code above in your browser using DataLab