Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-08 Thread Douglas Bates
Marc Schwartz wrote: On Wed, 2004-07-07 at 07:57, Doran, Harold wrote: 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

Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Roger Bivand
On Wed, 7 Jul 2004, Doran, Harold wrote: Dear List: ?cut 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

Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 07:57, Doran, Harold wrote: 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

R: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Guazzetti Stefano
consider a cutpoint of 20 x-runif(100, min=1, max=50) as.integer(x 20) Stefano -Messaggio originale- Da: Doran, Harold [mailto:[EMAIL PROTECTED] Inviato: mercoledì 7 luglio 2004 14.57 A: [EMAIL PROTECTED] Oggetto: [R] Creating Binary Outcomes from a continuous variable Dear

[R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Doran, Harold
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)