ggkeystone: ggkeystone

Description Usage Arguments Value Examples

View source: R/sccwrpwbe_functions.R

Description

The ggkeystone function takes in arguments from covid_lag as well as date_range. It also takes in a parameter k which represents the number of days to take a rolling average over. It returns the "keystone" graphic showing the relationship between waste water concentration and new Covid cases.

Usage

1
ggkeystone(data, target, k = 7, lag = 1L, offset = 0, CC = F, ...)

Arguments

data

Formatted Hyperion or Pt.Loma df

target

Character 'N1' or 'N2' "assays"

k

Number of days for rolling average.

lag

Number of days for lagged difference from n parameter in covid_lag

offset

Number of days to shift concentrations from covid_lag

CC

CC parameter from covid_lag

...

date_range

Value

Returns keystone plot across all 4 normalization methods

Examples

1
2
3
#note should be used with some imputation method such as na_kalman()
library(imputeTS)
Hyperion %>% na_kalman() %>% ggkeystone(target = "N1") + ylab("")

atki2828/sccwrpwbe documentation built on Dec. 19, 2021, 5:41 a.m.