>>>>> "j" == joe85 <johan...@dsr.life.ku.dk> >>>>> on Thu, 12 Feb 2009 06:16:02 -0800 (PST) writes:
j> Hello j> I want to make some variables with the ifelse-function, but i don't know how j> to do it. j> I want to make these five variables; j> b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0) j> b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0) j> b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0) j> b2$sanDk <- ifelse(b2$status=='D' | b2$status=='sanBb',1,0) j> b2$totalvac <- ifelse(b2$status=='San',1,0) j> And j> b2$UGT <- ifelse(b2$status=='UGT',1,0) j> b2$KOM <- ifelse(b2$status=='KOM',1,0) What has this to do with R-gui ?????? Please use R-help for such questions !!! Martin Maechler, ETH Zurich [................] _______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui