Hi everyone, I'm having some trouble with my ifelse statements.
I'm trying to put 12 conditions within 3 groups. Here is the code I have so far: dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" | dat$cond == "cond3" dat$cond == "cond4" yes = "Uniform" no = ifelse(test = dat$cond == "cond5" | dat$cond == "cond6") | dat$cond == "cond7" dat$cond == "cond8" yes = "Biased Low" no = "Biased High" ) I keep getting an error statement about an invalid ). I've tried several permutations to fix, but without luck. Also, can anyone help me bind columns together? I've tried: cbind[, c(15:25)] but get the error: object of type 'closure' is not subsettable Thank you in advance! Kirsten [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.