Learn R Programming

Covid19Wastewater (version 1.0.1)

makeQuantileColumns: Add many combo of rolling quantile columns to dataframe have info for each quant window combo

Description

Add many combo of rolling quantile columns to dataframe have info for each quant window combo

Usage

makeQuantileColumns(DF, quants, windows, column = "N1")

Value

DF with added columns window:what window group the row is in quant:what quantile group the row is in ntile: a rolling quantile of the data pastKavg.wwlog10: a mean of the last K days

Arguments

DF

Dataframe containing columns: site: what site the data is from date: date variable communicating the day the measurement is from *column: DF needs to contain a column with the same name as the string in the variable column

quants

vector containing the different quantiles

windows

vector containing the different windows

column

string name of column in DF

Examples

Run this code
data("Example_data", package = "Covid19Wastewater")
Example_data$site = "madison"
makeQuantileColumns(Example_data, .5, 6, column = "geo_mean")
makeQuantileColumns(Example_data, c(.5, .75), c(2,5), column = "geo_mean")

Run the code above in your browser using DataLab