Description Usage Arguments Value
View source: R/plot_functions.R
This function plots the two time series and correlation over time There are optional arguments for confidence bands on x_var and customisation of the maximum value of the y-axis and labels for the facets of grp_var
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
dat |
data frame with columns that correspond to two time series and grouping variable(s) |
date_var |
character string of the column name that corresponds to the date variable date_var must be specified if subset_date is not null. |
grp_var |
character string of column names in dat to be used as grouping variable(s) |
x_var |
primary time series (should be a column in dat) |
y_var |
secondary time series (should be a column in dat) |
x_var_lower |
column in dat corresponding to lower bound of confidence band for x_var |
x_var_upper |
column in dat corresponding to upper bound of confidence band for x_var |
facet_labels |
vector of labels for facets (grp_var) |
legend_labels |
character vector of labels to use for plot legend |
y_max |
maximum value of y-axis |
col_values |
vector of color values |
tibble of lags by grp_var
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.