powered by
Change the base year.
rebase(x, n = NULL)rebase_origin(x)
rebase_origin(x)
[univariate vector]
Univariate vector, numeric or ts object with only one dimension.
[numeric(1): NULL]
The index of the new base year.
Returns a vector with the same class and attributes as the input vector.
# NOT RUN { 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 # }
Run the code above in your browser using DataLab