replace_outlier | R Documentation |
change outlier values as NA or winsorize
replace_outlier(object, method, nSD)
## Default S3 method:
replace_outlier(object, method = "winsorize", nSD = 5)
## S3 method for class 'data.frame'
replace_outlier(object, method = "winsorize", nSD = 5)
## S3 method for class 'Metabolite'
replace_outlier(object, method = "winsorize", nSD = 5)
object |
An object, a vector, data.frame, data.table or Metabolite. |
method |
Replace outlier value method, the default method is 'winsorize': replace the outlier values by the maximum and/or minimum values of the remaining values. 'as_NA': set as NA (do not use this method if using half-min imputation). |
nSD |
Define the N times of the SD as outliers. |
An object after replacing outlier values.
data(df_plasma)
d <- replace_outlier(df_plasma, method = "winsorize", nSD = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.