[R] Excluding data in R

Kevin Wang Kevin.Wang at maths.anu.edu.au
Sun Oct 3 15:09:50 CEST 2004


On Sun, 3 Oct 2004, Laura Collins wrote:

> How do you exclude outliers from a set of data?

Your question is too vague.  I'm assuming you have a data frame and
already know exactly which observations are the outlier(s).  If your data
frame is called foo.df, and say observation 5 is an outlier, then
something like:
  foo.df[-5, ]
will exclude it.


Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

More information about the R-help mailing list