<[EMAIL PROTECTED]> writes: > A more serious, philosophical word on Patrick's solution. It is > rarely necessary (in my limited experience, sure) to have to use > parse() like this. Where it provides a quick (kludgy?) solution I > often find it a useful exercise to consider alternatives. They often > come out simpler and you nearly always pick up something useful in > the process.
Agreed. And the kludges (yes, they are) are prone to unexpected behaviour if you try to use them generally. R's modelling code has quite a few (not that I've counted them) constructs of the type formula <- parse(paste("~", paste(terms, collapse="+"))) which breaks down horribly if one the terms has a nonstandard name like `age in years`. Somewhere on my horizon is the task of hunting down all of these and replace them with something independent of textual representation. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html