Description Usage Arguments Value Author(s) Examples
This function calculates the outlier-robust weighted mean in presence of outliers. A kernel weight function has been used in this function.
1 | weightedMean(x, b)
|
x |
a numerical vector of metabolomic measurements. |
b |
value of tuning parameter. Default value is 0.2. |
Computed the weighted mean.
Nishith Kumar <nk.bru09@gmail.com>
1 2 3 4 5 6 7 | set.seed(2345)
x<-c(rnorm(200,3,1))
x1<-c(rnorm(180,3,1),rnorm(20,60,3)) #contain 20 outliers#
weightedMean(x)
mean(x)
weightedMean(x1)
mean(x1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.