关注this做什么:
diff(SomeTimeSeries)
做什么?默认情况下是否执行:
diff(SomeTimeSeries, differences = 1)
或者是否使用ndiff来定义差异的正确值?
答案 0 :(得分:1)
通过查看diff
帮助文件(?diff
)的用法部分,您可以看到,是的,默认情况下differences
参数已设置这个"工作"对于R中的每一个函数。
diff(x, ...)
## Default S3 method:
diff(x, lag = 1, differences = 1, ...)
## S3 method for class 'POSIXt'
diff(x, lag = 1, differences = 1, ...)
## S3 method for class 'Date'
diff(x, lag = 1, differences = 1, ...)