开发者

using cut for cyclic data

开发者 https://www.devze.com 2023-01-08 13:56 出处:网络
i am trying to analyse wind data using the \'cut开发者_如何学编程\' command, i want to set 16 wind directions

i am trying to analyse wind data using the 'cut开发者_如何学编程' command,

i want to set 16 wind directions

how can i cut directions 348.75 till 11.25 to a "0" label? thank you

eliav


probably this is not a general one and ad-hoc solution, but you can do it 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's a nice circular package to help you work with directional data.

0

精彩评论

暂无评论...
验证码 换一张
取 消