View source: R/f_comparing_indices.R
compare_indices_df | R Documentation |
This function returns a figure with plots of selected price indices.
compare_indices_df(
data,
names = colnames(data)[2:length(colnames(data))],
date_breaks = "1 month"
)
data |
The user's data frame with price index values. It must contain columns: |
names |
A vector of strings indicating names of indices which are to be used in the figure's legend. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
This function returns a figure with plots of previously calculated indices (together with dates on X-axis and a corresponding legend). Indices must be provided as a data frame, where the the first column must includes dates limited to the year and month (e.g.: "2020-04").
df<-price_indices(milk, start = "2018-12", end = "2019-12",
formula=c("laspeyres", "fisher"), interval = TRUE)
compare_indices_df(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.