[R] Excluding columns from dataframe and selecting row records

From: Milton Cezar <miltinho_astronauta_at_yahoo.com.br>
Date: Sun 17 Sep 2006 - 20:08:29 GMT


Dear R-friends,    

  I have to simple questions. First I would like to exclude some columns from a dataframe and after I need select rows that satisfy some conditions.   My data frame looks like    

  Region Species Bodysize Weigth Age

  Africa  Sp1 10.2 20 2
  Africa  Sp2 12.2 12 2
  Africa  Sp3 15.3 18 3
  Africa  Sp4 11.5 40 4
  Brazil  Sp1 10.2 40 3
  Brazil  Sp2 22.2 32 2
  Brazil  Sp3 12.3 28 3
  Brazil  Sp4 21.5 30 5
   

  And I need for example only "columns" Bodysize Weigth and Age when Region=="Brazil" AND Species=="Sp2" AND Age>=3    

  In fact my dataset is greater than this, but it is just a example.    

  Thanks for all helps,    

  Kind regards,    

  Miltinho                  


 Música para ver e ouvir: You're Beautiful, do James Blunt

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon Sep 18 06:17:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 18 Sep 2006 - 09:30:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.