calculate_index | R Documentation |
The index can be calculated in two ways:
from a series of values
from a series of mutations (from_growth_rate = TRUE)
calculate_index(periods, values, reference_period = NULL)
periods |
vector/variable with periods (numeric/string) |
values |
vector/variable with to be transformed values (numeric) |
reference_period |
period or group of periods that will be set to 100 (numeric/string) |
N.B. with from_growth_rate: The series of mutations must be equally long to the series of values. The vector should, therefore, also contain a mutation for the first period (this is likely 1). In the calculation, this first mutation is not used.
N.B. for the reference period: The first value is on default set to 100. An adjusted reference period can be provided in the paramater. The reference period can also be a part of a period. E.g. if the series contains months (2019jan, 2019feb), the reference period can be a year (2019).
Index series
Farley Ishaak
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.