simpout: Find out NAs and outliers in a variable(column)

Description Usage Arguments Value Examples

View source: R/UTL.simpout.r

Description

This function will find out missing values and outliers in a certain variable in a dataset. Outliers are defined as mean +- iqrband * interquartile range (IQR). Values exceed the min and max will also be marked as outliers.

Usage

1
simpout(dataset, variable, iqrband=2, min=NULL, max=NULL, type=8)

Arguments

dataset

Name of the dataset

variable

Name of the variable.It should be entered as a character. For example, "BMI".

iqrband

The multiplier of IQR. Pick 3 for the very end extreme values. Pick 2 to be more inclusive

min

The smallest value that will not be determined as outliers

max

The largest value that will not be determined as outliers

type

An integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used.

Value

Unlike function outvalues, this function will only return those outliers and missing values.

Examples

1
2
simpout(baseline, "BMI") # default iqrband=2
simpout(baseline, "BMI", iqrband=3, min=15, max=35, type=8)

haozhu233/ifaR.handtools documentation built on May 17, 2019, 2:30 p.m.