John Kane <jrkrideau <at> yahoo.ca> writes: > I have a dataset just imported from SPSS. It has any > number of 99's as missing data and it looks like the > next dataset will have custom missing codes. I have > abouat 120 variables and an N of 2000. > ... > > # define function > fn <- function (x a) {
you need comma between x and a i.e. (x, a) ^ > if (x==a)return (b) else x > } How can you return b, if b was not defined before Gregor ______________________________________________ R-help@stat.math.ethz.ch 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.