Learn R Programming

Covid19Wastewater (version 1.0.1)

sgolaySmoothMod: sgolaySmoothMod Add a column of the smoothed values using sgolayfilt

Description

sgolaySmoothMod Add a column of the smoothed values using sgolayfilt

Usage

sgolaySmoothMod(DF, InVar, OutVar, poly = 5, n = "guess", Filter = NULL)

Value

DF with an extra col with a sgolayfilt smoothed version of InVar

Arguments

DF

dataframe containing the columns specified below

InVar

The column to be smoothed

OutVar

The name of the new column

poly

The degree of the polynomial fit

n

The number of points per polynomial fed into sgolayfilt. if it equals "guess" then it is 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",]
Covid19Wastewater::sgolaySmoothMod(WasteWater_data,"N1","sgolayN1")

Run the code above in your browser using DataLab