View source: R/f_data_processing.R
products_fig | R Documentation |
This function returns a figure with plots of volume (or contributions) of available, matched, new as well as disappearing products.
products_fig(
data,
start,
end,
show = c("available", "matched", "new", "disappearing"),
fixed_base = TRUE,
contributions = TRUE,
date_breaks = "1 month"
)
data |
The user's data frame with information about sold products. It must contain columns: |
start |
The base period (as character) limited to the year and month, e.g. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
show |
A character vector indicating which groups of products are to be taken into consideration. Available options are |
fixed_base |
A logical parameter indicating whether each month is to be compared to the base period (TRUE) or to the previous month (then it is set to FALSE). |
contributions |
A logical parameter indicating whether contributions or volumes counted for available, matched, new and disappearing products are to be displayed. |
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 volume (or contributions) of available, matched, new as well as disappearing products. The User may control which groups of products are to be taken into consideration (see the show
parameter). Available options are available
, matched
, new
and disappearing
.
products_fig(milk, "2018-12","2019-04",
fixed_base=TRUE, contributions=FALSE,
show=c("new","disappearing","matched","available"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.