removeOutliers: Calculate outliers in a numeric vector and then convert those...

Description Usage Arguments Value Examples

View source: R/removeOutliers.R

Description

Calculate outliers in a numeric vector and then convert those values to NA

Usage

1
removeOutliers(x, tolerant = TRUE)

Arguments

x

A numeric vector

tolerant

Outlier calculation tolerance. A more tolerant outlier removal is more appropriate when working with hazard ratios

Value

The modified, outlier removed, equivalent of x

Examples

1
2
3
4
set.seed(123); x <- rnorm(100)
sum(is.na(x))
y <- removeOutliers(x)
sum(is.na(y))

survivALL documentation built on May 1, 2019, 11:02 p.m.