remove_outliers: remove_outliers

Description Usage Arguments Value See Also Examples

View source: R/remove_outliers.R

Description

Remove outliers from data frame
This function does not remove the entire row of data, only replaces the outlier value with NA in a particular column

Usage

1
remove_outliers(df, x = 2.5, skip = NULL, only = NULL)

Arguments

df

data frame with first column as ID

x

number of standard deviations from the mean to qualify as an outlier

skip

list of column names that are not processed for outliers

only

list of column names that are processed for outliers, any others are skipped

Value

data frame with outlier values within each column replaced with NA

See Also

Other filter functions: colfilter, get_binary, get_categorical, get_check, get_continuous, min_cat_n, min_n, remove_incomplete_obs, rowfilter

Other continuous variable functions: box_plot, correlations, hist_fun, multi_plot, outlier_impact, qq_fun, qq_plot

Examples

1
2
3
require(NHANES)
data(NHANES)
summary(remove_outliers(get_continuous(NHANES), x=3))

HallLab/clarite documentation built on Oct. 27, 2020, 6:27 p.m.