[R] identifying outliers

Thomas Subia tgs77m at yahoo.com
Thu Apr 7 06:09:54 CEST 2016

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

	[[alternative HTML version deleted]]

More information about the R-help mailing list