matched_fig | R Documentation |
The function provides a data frame or a figure presenting the matched_index
function calculated for the column defined by the type
parameter and for each month from the considered time interval
matched_fig(
data,
start,
end,
base = "start",
type = "prodID",
fixedbase = TRUE,
figure = TRUE,
date_breaks = "1 month"
)
data |
The user's data frame. It must contain a column |
start |
The beginning of a time interval (as character) limited to the year and month, e.g. "2019-03". |
end |
The end of a time interval (as character) limited to the year and month, e.g. "2019-04". |
base |
The base period (as character) for product comparisons. Its possible values are: "start" and "end". |
type |
This parameter defines the column which is used in the procedure. Possible values of the |
fixedbase |
A logical parameter indicating whether the procedure is to work for subsequent months from the considered time interval ( |
figure |
A logical parameter indicating whether the function returns a figure (TRUE) or a data frame (FALSE) with |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
The function returns a data frame or a figure presenting the matched_index
function calculated for the column defined by the type
parameter and for each month from the considered time interval. The interval is set by start
and end
parameters. The returned object (data frame or figure) depends on the value of figure
parameter. The returned values belong to [0,1].
matched_fig(milk, start="2018-12", end="2019-12")
matched_fig(milk, start="2018-12", end="2019-12", figure=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.