View source: R/plotting_functions.R
smooth_outcome | R Documentation |
Function is a wrapped around smooth_pre_process
and smooth_dt
smooth_outcome(
dt,
xvar = "Date",
yvar = "Confirmed",
knot_interval = 21,
family = c("poisson", "gaussian")
)
dt |
data frame containing the data to be smoothed |
xvar |
string name of column in |
yvar |
string name of column in |
knot_interval |
how frequently should the nots be placed? default is 21, which in the case of plotting daily covid data, represents one knot every 3 weeks |
family |
string indicating family, must be either "poisson" (default) or "gaussian" |
vector of smoothed predictions
smooth_outcome(brazil)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.