[R] nice report generator?
Hadley Wickham
hadley at rice.edu
Fri Feb 10 16:35:42 CET 2012
>> 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/
More information about the R-help
mailing list