[R] How can I delete components in a column ?

From: Yen Ngo <yen_h_ngo_at_yahoo.se>
Date: Mon 09 Oct 2006 - 15:15:18 GMT


Hi all R-helpers,    

  i am a new R-user and have problem with deleting some components in a column. I have a dataset like    

  Name  Id        x
           empty   2
           empty   3
  a        none    2
  b        none    3
  d       none     2
  ad      cfh       4
  bf       cdt       5
           empty   2
           empty   2
  gf      cdh       4
  d       none     5
   

  and want to eliminate all components that have id=none and empty . The remaining data should be    

  Name  Id       x
  ad       cfh      4
  bf        cdt      5
  gf        cdh     4
   

  How can I do this ? The components with id=empty have no name.    

  Thanks in advance,
  Regards,
  Yen

        [[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 Tue Oct 10 01:22:15 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 09 Oct 2006 - 16:30:09 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.