>> To be strictly correct, shouldn't that be: >> >> formula<- eval(substitute( value*v*LEFT ~ RIGHT, list(LEFT=LEFT, >> RIGHT=RIGHT))) >> >> ? > > > I think it probably doesn't matter. The difference is that mine gives a > pure language object, whereas yours gives a formula object. The formula > object has a class which means some methods will work differently, and it > also has an environment attached, which defines where the variables in it > should be resolved. I suspect the variables shouldn't be resolved in the > environment where "formula" was being created, so it's probably better not > to attach an environment at all, but the tabular function ignores the > environment of the formula (it uses its data argument for that), so it > doesn't make a big difference.
Yes, sorry, I was probably being excessively picky :/ Formula semantics are tricky though! 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.