R中的螺旋图 [英] Spiral Graph in R

查看:482
本文介绍了R中的螺旋图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在R中创建一个螺旋图?有没有用于这种分析的软件包?或者有没有其他方式可视化时间导向的数据(关于周期性)?

解决方案

用于检查周期性,循环地块(pdf)效果良好。用于分析时间序列的周期性的功能也很多。从 stl periodicity 开始于 xts 包中。 / p>

使用 ggplot2 ,您可以创建如下的螺旋图形:

  library(ggplot2)
数据(海狸)
p < - ggplot(beaver1,aes(time,temp,color = day))+
geom_line()+
coord_polar(theta =x)
p


How to create a spiral graph in R? Is there any package for this kind of analysis? Or is there any other way to visualize time oriented data (regarding periodicity)?

解决方案

For examining periodicity, cycle plots (pdf) work well. There are also many, many functions for analysing periodicity in time series. Start with stl and periodicity in the xts package.

Using ggplot2, you can create a spiral graph like this:

library(ggplot2)
data(beavers)
p <- ggplot(beaver1, aes(time, temp, colour = day)) + 
  geom_line() + 
  coord_polar(theta = "x")
p

这篇关于R中的螺旋图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆