I'm trying to analyze wind data using the “cut” command,I want to set 16 wind directions,how can I cut the directions 348.75 to 11.25 to the mark “0”? thank you Eliav
This is probably not a general, but a special solution, but you can do this by adding 360/16/2 to the direction value:
w<- -15:375 direction<-cut((w+360/16/2)%%360,breaks=seq(0,360,length=17),labels=FALSE)-1
There is a good circularpackage that will help you work with directional data.
circular
Source: https://habr.com/ru/post/1756404/More articles:Смутно с наследованием С++ - c++give MySQL or PHP work? - performancePeriodically check if Android Android has new data - performanceImmutable Object in Objective-C: Big init Method? - immutabilityjQuery Advance Selector - jqueryWhat is the best way to prevent the browser from displaying images until they are fully loaded? - javascriptautomatically save php variables without a database - variablesCreating XML schema from JAXB class files in Ant - javaChecking an empty input number - pythonJQuery.get () - How do I pass a text field value to a data parameter? - javascriptAll Articles