Leg*_*end 5 plot r graph time-series ggplot2
我有一个时间序列表示我的数据如下(没有行和列)注释:
L1 L2 L3 L4
t=1 0 1 1 0
t=2 0 1 1 1
t=3 1 0 1 1
t=4 0 1 1 0
Run Code Online (Sandbox Code Playgroud)
我把它读成R作为:
timeseries = read.table("./test", header=F)
Run Code Online (Sandbox Code Playgroud)
我正在为L1使用绘制时间序列
ts.plot(timeseries$V1)
Run Code Online (Sandbox Code Playgroud)
并将互相关函数绘制为:
ccf(timeseries$V1, timeseries$V2)
Run Code Online (Sandbox Code Playgroud)
现在,有人可以告诉我如何绘制交叉相关矩阵,显示L1-L4的此功能输出?基本上,像这样(在我的例子中,4x4矩阵的图表):

似乎还有另一种琐碎的方式!
timeseries = read.table("./test", header=F)
acf(timeseries)
Run Code Online (Sandbox Code Playgroud)
给我一个相关图矩阵.当然,acf如果需要协方差,还可以传递其他选项.
| 归档时间: |
|
| 查看次数: |
9480 次 |
| 最近记录: |