Skip to content
Prev 304444 / 398503 Next

define subset argument for function lm as variable?

Le mardi 21 ao?t 2012 ? 07:51 -0700, Joshua Wiley a ?crit :
Out of curiosity, why isn't "subset" (and "weights", which is very
similar in that regard) evaluated in the "data" environment, just like
the formula? Is this for historical reasons, or are there drawbacks to
such a feature?

It seems very common to pass a data frame via the "data" argument, and
use variables from it for subsetting and/or weighting.


Regards