Description Usage Arguments Value Examples
1 | Results may be negative.
|
1 |
x |
xts object |
b |
choose -1 (or less) to look into the future |
l |
observations backwards |
lg |
log |
... |
dots passed |
xts object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# RC (relative change) example
xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2))
[,1] [,2]
1970-01-01 1 8
1970-01-02 -2 16
1970-01-03 -4 32
RC(xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2)))
V1rc.0.1 V2rc.0.1
1970-01-01 NA NA
1970-01-02 -2 2
1970-01-03 -1 2
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.