The data that you are passing, must be a data.frame/tibble.
.date_col
The column that holds the date.
.value_col
The column that holds the value.
.sma_order
This will default to 1. This can be a vector like c(2,4,6,12)
.func
The unquoted function you want to pass, mean, median, etc
.align
This can be either "left", "center", "right"
.partial
This is a bool value of TRUE/FALSE, the default is TRUE
Author
Steven P. Sanderson II, MPH
Details
This function will accept a time series object or a tibble/data.frame. This is a
simple wrapper around timetk::slidify_vec(). It uses that function to do the underlying
moving average work.
It can only handle a single moving average at a time and therefore if multiple
are called for, it will loop through and append data to a tibble object.