> I, personally, utilize the ifelse(test,statement,statement) function when > possible over the methodology outlined.
if + else and ifelse perform quite different tasks, and in general can not (and should not) be exchanged. In particular, note that for ifelse, "the class attribute of the result is taken from ‘test’ and may be inappropriate for the values selected from ‘yes’ and 'no’". Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ 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.