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

View source: R/library--data_prep--smooth_tools--ts_trend_gen.R

sgolaySmoothModR Documentation

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)

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

Value

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

Examples

data(Example_data, package = "Covid19Wastewater")
Example_data <- Example_data[Example_data$site == "Green Bay",]
Covid19Wastewater::sgolaySmoothMod(WasteWater_data,"N1","sgolayN1")

Covid19Wastewater documentation built on Aug. 25, 2023, 1:07 a.m.