Skip to content
Prev 359870 / 398502 Next

identifying outliers

Thanks for writing this great piece of code.

 

x = rnorm(100)

boxplot(x) # you shouldn't see any outliers here although sometimes yow will

 

# lets add some outliers intentionally

x = c(21, 20, 25, x) # now 10, 15 and 20 are outliers

 

myboxplot <- boxplot(x) # now you should see your three outliers

 

myboxplot$out # it will print the values of the outliers

 

How does one amend this code to produce the outliers by a group?

 

All the best,

 

Thomas Subia