smooth_ww {ern}R Documentation

Smooth wastewater data (using pre-processed wastewater)

Description

Smooth wastewater data (using pre-processed wastewater)

Usage

smooth_ww(ww.conc, prm.smooth, silent = FALSE)

Arguments

ww.conc

Data frame. Must have variables:

  • date: calendar date of wastewater collection

  • value: pathogen concentration

prm.smooth

List. list of smoothing parameters. Parameters should be specified as followed:

  • method: smoothing method, either 'rollmean' (rolling mean) or 'loess' (LOESS smoothing via stats::loess())

  • window: for ⁠method = 'rollmean⁠ only; width of smoothing window in days

  • align: for ⁠method = 'rollmean⁠ only; smoothing alignment, either 'center', 'left', 'right'

  • span: for method = 'loess' only; smoothing span (see the documentation for stats::loess() for details)

  • floor: optional call for wastewater concentration smoothing with method = 'loess' only; user defined minimum smoothing concentration

Set this entire list to NULL to turn off smoothing

silent

Logical. Flag to suppress all output messages, warnings, and progress bars.

Value

Data frame


[Package ern version 2.0.0 Index]