clmean | R Documentation |
Compute the mean after removing or replacing outliers. Outliers are values above or under certain fixed cutoffs, and values which are more than a certain number of standard deviations away from the mean. The best way to understand the details is to read the function's source code (any verbal explanation will much longer).
clmean(x, max.sd = 2, cutoff.min = NULL, cutoff.max = NULL, replace = F)
x |
a numeric vector. |
max.sd |
number of stddev from the mean above which an item is considered an outlier. |
cutoff.min |
a numeric value: items lower than that are considered outlier |
cutoff.max |
a numeric value beyond which items are considered outliers. |
replace |
should outliers be excluded or replaced by the cutoff value? |
mean
.
x=c(1,2,3,4,5,20) clmean(x) clmean(x,max.sd=3) clmean(x,replace=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.