Skip to content
Prev 304445 / 398503 Next

define subset argument for function lm as variable?

On Wed, Aug 29, 2012 at 3:56 AM, Milan Bouchet-Valat <nalimilan at club.fr> wrote:
I am not sure about weights offhand, but subset is evaluated in the
data environment----that is why that solution works.  The original
question was how to setup the expression as an object that was passed
to subset.  The trick is to avoid having the logical expression
evaluated when the object is created, which I avoided by using
expression, and then in lme() forcing the evaluation of the object.