Skip to content
Prev 38786 / 63421 Next

scoping/non-standard evaluation issue

On Tue, Jan 4, 2011 at 4:35 PM, John Fox <jfox at mcmaster.ca> wrote:
I think there is something wrong with R here since the formula in the
call component of mod.1 has a "call" class whereas the corresponding
call component of mod.2 has "formula" class:
[1] "call"
[1] "formula"

If we reset call[[2]] to have "call" class then it works:
Call:
lm(formula = Employed ~ GNP.deflator + GNP + Unemployed + Armed.Forces +
    Population + Year, data = longley, subset = subs)

Coefficients:
 (Intercept)  GNP.deflator           GNP    Unemployed  Armed.Forces
 Population          Year
   3.641e+03     8.394e-03     6.909e-02    -3.971e-03    -8.595e-03
  1.164e+00    -1.911e+00