Description Usage Arguments Value Examples
Change the base year.
1 2 3 | rebase(x, n = NULL)
rebase_origin(x)
|
x |
Univariate vector, numeric or ts object with only one dimension. |
n |
The index of the new base year. |
Returns a vector with the same class and attributes as the input vector.
1 2 3 4 5 6 7 8 9 10 11 | x <- 3:10
# New base would be 5
rebase(x, 5)
# Or the origin
rebase_origin(x)
# Fro the base to be 100 or 0 then:
rebase(x, 5)*100
rebase(x, 5) - 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.