使用conversion.circular函数缩放和居中圆形分布

时间:2018-04-25 18:18:14

标签: r

使用circular包,我有一个循环数据对象:

x <- structure(c(44, 95, 88, NA, 317, 16, NA, NA, 85, NA, 31, 14, 323, 336, 345, 338, 10, 3, 342, 325, 30, 311, 359, 335, 331, 4, 347, 9, 9, 33, 335, 345, 355, 346, 18, 9, 341, 24, 352, 343, 3, 22, NA, 356, 14, 5, 8, NA, 352, 36, NA, 312, 352, 8, 351, 338, 341, 316, 357, 331, 326, 8, 347, 342, 315, 336, 9, 355, 0, 227, 14, 292, NA, 342, 352, 351, 1, 339, 358, 341, 1, 22, 20, 1, 285, 357, 279, 13, 25, 16, 353, 348, 2, 354, 357, 32, 7, 351, 349, 24, 354, 352, 352, 357, 356, 355, 332, 348, 30, 351, 128, 348, 358, 337, 177, 11, 314, 282, 342, 285, 168, 14, 26, 32, 21, 13, 11, 19, 17, 29, 285, 22, 0, 35, 8, 7, 25, 357, 354, 17, 46, 14, 6, 350, 355, 324, NA, 298, 356, 6), class = c("circular", "numeric"), circularp = structure(list(type = "angles", units = "degrees",     template = "none", modulo = "2pi", zero = 1.5707963267949, rotation = "clock"), .Names = c("type", "units", "template", "modulo", "zero", "rotation")))

plot(x)

hist(as.numeric(x))看起来像这样:

enter image description here

如何缩放和重新定位此数据,使范围为[-pi:pi]且中心为0?我尝试了conversion.circular,但无法正确获取参数。

0 个答案:

没有答案