Re: [R] Data Parsing

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.be>
Date: Tue 21 Jun 2005 - 01:29:13 EST

try this:

results.pas <- results[results$Score != "Failed", ]

I hope it helps.

Best,
Dimitris



Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium

Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


> Hello. I have looked at R Site Search for this problem, and it
> didn't
> give me exactly what I needed.
>
> Consider this dataset called "results". It has the following
> information:
>
> Student Day Subject Score
>
> Mary 1 Math Failed
> David 2 Science Passed
> Bob 4 Reading Passed
> Marie 4 Reading Failed
> Jesse 3 Spelling Borderline
> Et cetera
>
>
> My goal is to only do analysis of the data having to do those who
> passed
> or who are borderline. I want to ignore all of the data having to
> do with
> those who failed. I think part of the syntax is something like
> results[-c("Failed")], but I'm not getting anywhere with it.
>
> How do I create a separate data set containing all information on
> students
> who either passed or were borderline?
>
> Thanks.
>
> Bernard
>
> --
> Do all you can with what you have in the time you have in the place
> you are!
>
> -Nkosi Johnson, 12-year old African hero
>
> ______________________________________________
> 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
>



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 Received on Tue Jun 21 01:34:27 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:54 EST