Bill I found a workaround: f <- ff(formula, lab) f <- as.formula(gsub("`", "", as.character(deparse(f))))
Thanks for your elegant solution. Frank ------------------------------ Thanks Bill. The problem is one of the results of convertName might be 'Heading("Age in Years")*age' (this is for the tables package), and as.name converts this to `Heading("...")*age` and the backticks cause the final formula to have a mixture of regular elements and ` ` quoted expression elements, making the formula invalid. Best, Frank ------------------------------------------------------------------- -- Frank E Harrell Jr Professor and Chairman School of Medicine Department of Biostatistics Vanderbilt University ______________________________________________ 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.