powered by
Calculate outliers in a numeric vector and then convert those values to NA
removeOutliers(x, tolerant = TRUE)
A numeric vector
Outlier calculation tolerance. A more tolerant outlier removal is more appropriate when working with hazard ratios
The modified, outlier removed, equivalent of x
# NOT RUN { set.seed(123); x <- rnorm(100) sum(is.na(x)) y <- removeOutliers(x) sum(is.na(y)) # }
Run the code above in your browser using DataLab