-----Messaggio originale-----
Da: Doran, Harold [mailto:HDoran at air.org]
Inviato: mercoled?? 7 luglio 2004 14.57
A: r-help at stat.math.ethz.ch
Oggetto: [R] Creating Binary Outcomes from a continuous variable
Dear List:
I have searched the archives and my R books and cannot find a
method to
transform a continuous variable into a binary variable. For example, I
have test score data along a continuous scale. I want to create a new
variable in my dataset that is 1=above a cutpoint (or passed the test)
and 0=otherwise.
My instinct tells me that this will require a combination of the
transform command along with a conditional selection. Any help is much
appreciated.
Thanks,
Harold
[[alternative HTML version deleted]]