[R] Creating Binary Outcomes from a continuous variable
Roger Bivand
Roger.Bivand at nhh.no
Wed Jul 7 15:01:24 CEST 2004
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 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]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list