[R] How to remove multiple outliers
aajit75
aajit75 at yahoo.co.in
Thu Oct 20 14:11:59 CEST 2011
Hi All,
I am working on the dataset in which some of the variables have more than
one observations with outliers .
I am using below mentioned sample script
library(outliers)
x1 <- c(10, 10, 11, 12, 13, 14, 14, 10, 11, 13, 12, 13, 10, 19, 18, 17,
10099, 10099, 10098)
outlier_tf1 = outlier(x1,logical=TRUE)
find_outlier1 = which(outlier_tf1==TRUE, arr.ind=TRUE)
beh_input_ro1 = x1[-find_outlier1]
It removes the outliers which are extrme and not all. In this example it
removes only 10099, 10099 and not 10098.
Thanks for the help in advance.
-Ajit
--
View this message in context: http://r.789695.n4.nabble.com/How-to-remove-multiple-outliers-tp3921689p3921689.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list