View source: R/library--data_prep--filter_tools--make_quantile_function.R
makeQuantileColumns | R Documentation |
Add many combo of rolling quantile columns to dataframe have info for each quant window combo
makeQuantileColumns(DF, quants, windows, column = "N1")
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 |
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
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.