开发者

using cut for cyclic data

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜