removeOutliers: Remove outliers

Description Usage Arguments Examples

View source: R/removeOutliers.R

Description

Remove outliers from a data frame

Usage

1
removeOutliers(data, predictors, sd = 3)

Arguments

data

A data frame.

predictors

A vector of the column names in data corresponding to the predictors that outliers should be removed for sd The number of standard deviations. Predictor values further than sd standard deviations from the predictor mean are removed. Default: 3.

model

A PAM model.

Examples

1
2
3
4
5
6
# Load data for the lexical decision latencies in the British Lexicon Project (Keuleers et al, 2012)
data(ld)

# Remove outliers
ld = removeOutliers.fnc(ld, c("logFrequency","Length","logOLD20","SND20"))
ld = na.omit(ld)

PeterHendrix13/distWorkshop documentation built on Nov. 5, 2019, 2:51 p.m.