View source: R/exclExtrValues.R
exclExtrValues | R Documentation |
This function aims to identify extreme values (values most distant to mean, thus potential outlyers), mark them as NA or directely exclude them (depending on 'showNAs
').
Note that every set of non-identical values will have at least one most extreme value. Extreme values are part of many distributions, they are not necessarily true outliers.
exclExtrValues(
dat,
result = "val",
CVlim = NULL,
maxExcl = 1,
showNA = FALSE,
goodValues = TRUE,
silent = FALSE,
callFrom = NULL
)
dat |
numeric vector, main input |
result |
(character) may be 'val' for returning data without extreme values or 'pos' for returning position/index of extreme values |
CVlim |
(NULL or numeric) allows to retain extreme values only if a certain CV (for all 'dat') is exceeded (to avoid calling extreme values form homogenous data-sets) |
maxExcl |
(integer) max number of elments to explude |
showNA |
(logical) will display extrelme values as NA |
goodValues |
(logical) allows to display rather the good values instead of the extreme values |
silent |
(logical) suppress messages |
callFrom |
(character) allow easier tracking of message(s) produced |
numeric vector wo extremle values or index-position of extreme values
firstOfRepLines
, get1stOfRepeatedByCol
for treatment of matrix
x <- c(rnorm(30),-6,20)
exclExtrValues(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.