[R] accessing the indices of outliers in a data frame boxplot

Karin Lagesen karin.lagesen at medisin.uio.no
Fri Jan 25 17:39:11 CET 2008


I have a data frame containing columns which are factors. I use this
to make boxplots for the data, with one box per factor. I would now
like to get at the data in the data frame which corresponds to the
outliers. I have so far found the $out, which gives "the values of any
data points which lie beyond the extremes of the whiskers", but I
haven't found anything which will let me get at the indices in the
original data frame for these outliers. 

I think there might be a chance that I could simply compare the values
I am plotting from my data frame with the values for the whiskers and
use that as a criteria, but I am unsertain of how to do this withhout
doing it manually. The factor I am plotting against contains 17
levels, and I'd thus like to see if there is a somewhat more general
solution available.

Thanks for your help!

Karin
-- 
Karin Lagesen, PhD student
karin.lagesen at medisin.uio.no
http://folk.uio.no/karinlag



More information about the R-help mailing list