Skip to contents

Makes rolling mean column(s) from a dataframe column defined by the user using window sizes also defined by the user.

Usage

auto_make_rMean_col(col, width = c(7))

Arguments

col

a column to make rolling means of

width

integer input indicating size of sliding window used to caluclate mean

Value

dataframe with rolling mean column(s)S

Examples


if (FALSE) { # \dontrun{
df = data.frame(index = 1:10, value1 = rnorm(10), value2 = rnorm(10))
 dplyr::mutate(df, auto_make_rMean_col(col = value1, width = c(3, 7)))
 } # }