[R] Finding vector entries

ben@zoo.ufl.edu ben at zoo.ufl.edu
Thu Sep 21 04:39:08 CEST 2000


  Use which().
  which(x==boxplot(x,range=1)$out)

On Wed, 20 Sep 2000, Will Critchlow wrote:

> I am just starting to learn R and am finding it to be very powerful.
> 
> I want to be able to analyse large vectors of data using boxplot to find
> outliers in the following way:
> 
> boxplot(x, range=1)$out
> 
> This works fine, returning the values which lie outside the whisker but I
> then want to know at what point in the vector, x the outliers lie (in other
> words, I want to find the index of the vector).
> 
> Is there an easy way to do this? Either by using a different option in
> boxplot or by searching x for those specific values afterwards.
> 
> Thanks
> 
> Will
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 
> 

-- 
318 Carr Hall                                bolker at zoo.ufl.edu
Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
Box 118525                                   (ph)  352-392-5697
Gainesville, FL 32611-8525                   (fax) 352-392-3704

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list