Learn R Programming

Covid19Wastewater (version 1.0.1)

windowingQuantFunc: create rolling quantile column based on date

Description

Takes 1 time series dataframe and adds a some columns specifying the rolling quantile and rolling mean of the selected column.

Usage

windowingQuantFunc(DF, column)

Value

DF with added columns ntile: a rolling quantile of the data pastKavg.wwlog10: a mean of the last K days

Arguments

DF

dataframe containing columns: date: date variable communicating the day the measurement is from window: singular type column saying what window the rolling function should use quant: singular value column saying what quantile to return *column: DF needs to contain a column with the same name as the string in the variable column

column

what column to use for the rolling quantile and mean functions