statistics - How to remove multiple outliers from a data.frame in R -
hi have 5 variables 1000 observations. 5 variables contain lot of outliers 10,11, 13, 1003, 10987, 1099 , contain missing values. want remove multiple outliers. please me.... in advance.
you create condition extract relevant data , exclude outliers. example if dataframe called "df1" , want extract data in column (e.g: column "2") values between 1 , 5:
condition1 <- df1[,2] >=1 & df1[,2] <=5 df1 <- df1[condition1,]
i hope helps
Comments
Post a Comment