Learn R Programming

Covid19Wastewater (version 1.0.1)

expSmoothMod: expSmoothMod Add a column of the smoothed values using exponential smoothing

Description

expSmoothMod Add a column of the smoothed values using exponential smoothing

Usage

expSmoothMod(DF, InVar, OutVar, alpha = "guess", beta = "guess", Filter = NULL)

Value

A DF with an extra col with a exp smoothed version of InVar

Arguments

DF

The DF we are to add a exponential smoothing column to

InVar

The column to be smoothed

OutVar

The name of the new column

alpha

The alpha fed into forecast exponential smoothing. if it equals "guess" then it if found using parameterGuess

beta

The beta fed into forecast exponential smoothing. if it equals "guess" then it if found using parameterGuess

Filter

Prefilter using the value of a Filter col

Examples

Run this code
data("Example_data", package = "Covid19Wastewater")
Example_data <- Example_data[Example_data$site == "Green Bay",]
expSmoothMod(Example_data, "N1", "expN1")

Run the code above in your browser using DataLab