Hi all,

I have a data set called x with    200 rows  and 12  columns.  I want
create  two more columns based on  probability. ie
 if p >0 .4 then  v1 =1 else v1=0;
 if p >0 .6 then  v2 =1 else v2=0;

Finally x will have 14 variables.

Can any one show me how to do that?

Thanks
Ashta


.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to