View source: R/f_comparing_indices.R
compare_indices_list | R Documentation |
This function returns a figure with plots of previously calculated price indices.
compare_indices_list(data = list(), names = c(), date_breaks = "1 month")
data |
A list of data frames with previously calculated price indices. Each data frame must consist of two columns, i.e. the first column must includes dates limited to the year and month (e.g.: "2020-04") and the second column must indicate price index values for corresponding dates. The above-mentioned single data frame may be created manually in the previous step or it may be a result of functions: |
names |
A vector of character strings describing names of presented indices. |
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 price indices. It allows for graphical comparison of price index values which were previously calculated and now are provided as a list of data frames (see data
parameter).
## Caluclating two indices by using two different package functions:
index1<-final_index(data=milk, start="2018-12",
end="2019-12",formula="walsh",interval=TRUE)
index2<-price_indices(milk,start="2018-12", end="2019-12",
formula="geks",window=13,interval=TRUE)
## Graphical comparison of these two indices
compare_indices_list(data=list(index1,index2),
names=c("Walsh index", "GEKS index"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.