diff.xts(xts)
diff.xts()所属R语言包:xts
Lags and Differences of xts Objects
XTS对象的滞后和差异
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Methods for computing lags and differences on xts objects. This matches most of the functionality of zoo methods, with some default argument changes.
方法计算滞后和xts对象上的差异。这符合大部分的功能zoo方法,与一些默认参数的变化。
用法----------Usage----------
## S3 method for class 'xts'
lag(x, k = 1, na.pad = TRUE, ...)
## S3 method for class 'xts'
diff(x, lag = 1, differences = 1, arithmetic = TRUE, log = FALSE, na.pad = TRUE, ...)
参数----------Arguments----------
参数:x
an xts object
xts对象
参数:k
period to lag over
期落后超过
参数:lag
period to difference over
期差超过
参数:differences
order of differencing
差分阶
参数:arithmetic
should arithmetic or geometric differencing be used
算术或几何差异
参数:log
should (geometric) log differences be returned
(几何)log返回分歧
参数:na.pad
pad vector back to original size
垫矢量恢复到原来的大小
参数:...
additional arguments
额外的参数
Details
详细信息----------Details----------
The primary motivation for having methods specific to xts was to make use of faster C-level code within xts. Additionally, it was decided that lag's default behavior should match the common time-series interpretation of that operator — specifically that a value at time "t" should be the value at time "t-1" for a positive lag. This is different than lag.zoo as well as lag.ts.
有具体的xts的方法的主要动机是利用更快的C-级代码内XTS。此外,它决定lag的默认行为应符合该运营商的共同时间系列演绎 - 特别是在时间t-1的值在时间“t”的值应该是“为一个积极滞后。这是不同lag.zoo和lag.ts。
Another notable difference is that na.pad is set to TRUE by default, to better reflect the transformation visually and within functions requiring positional matching of data.
另一个显着区别是na.pad设置为TRUE默认情况下,能够更好地反映转变在视觉和功能需要位置匹配的数据。
Backwards compatability with zoo can be achieved by setting options(xts.compat.zoo.lag=TRUE). This will change the defaults of lag.xts to k=-1 and na.pad=FALSE.
可以通过设置options(xts.compat.zoo.lag=TRUE)向后兼容动物园。这将改变的的默认lag.xts K = -1和na.pad的= FALSE。
值----------Value----------
An xts object reflected the desired lag and/or differencing.
xts对象反映所需的延迟和/或差异。
(作者)----------Author(s)----------
Jeffrey A. Ryan
参考文献----------References----------
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|