Description Usage Arguments Value Examples
1 | Differences by using Relative Change
|
1 |
x |
xts object |
l |
lag |
d |
differences |
... |
dots passed |
xts object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
# DFR(Differences by using Relative Change) examples
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
DFR(xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2)))
V1dfr.2.1 V2dfr.2.1
1970-01-01 NA NA
1970-01-02 -2 2
1970-01-03 -1 2
DFR(xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2)), d = 2)
V1dfr.2.1 V2dfr.2.1
1970-01-01 NA NA
1970-01-02 NA NA
1970-01-03 0.5 1
DFR(xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2)), l = 2)
V1dfr.2.1 V2dfr.2.1
1970-01-01 NA NA
1970-01-02 NA NA
1970-01-03 -4 4
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.