removeOutliers: Add column with NA values where the data was flagged

View source: R/library--data_prep--filter_tools--outlier_tools.R

removeOutliersR Documentation

Add column with NA values where the data was flagged

Description

Add column with NA values where the data was flagged

Usage

removeOutliers(DF, Messure, Filtcol, outputColName)

Arguments

DF

DF containing the columns Measure and Filtcol

Messure

The original measurement we want to keep inliers for

Filtcol

the column containing the Boolean info needed to remove outliers

outputColName

the name for the clean column

Value

DF with new column without the flagged values

Examples

data(Example_data, package = "Covid19Wastewater")
Example_data$site = "Madison"
df_data <- computeJumps(Example_data)
ranked_data <- rankJumps(df_data)
ranked_quantile_data <- computeRankQuantiles(ranked_data)
classied_data <- flagOutliers(ranked_quantile_data, 9)
removeOutliers(classied_data, sars_cov2_adj_load_log10, FlaggedOutlier, sars_adj_log10_Filtered)

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