[R] How to include an externally defined NULL value in lm
markleeds at verizon.net
markleeds at verizon.net
Mon Mar 3 23:34:41 CET 2008
>From: Matthieu Stigler <stigler3 at etu.unige.ch>
>Date: 2008/03/03 Mon PM 04:07:09 CST
>To: r-help at r-project.org
>Subject: [R] How to include an externally defined NULL value in lm
maybe you should a<-0 unless there's special
behavior of NULL that's unknownst to me ?
>Hello!
>
>I would love to be able to include an external variable to a lm call, I
>mean something:
>
>if(TRUE)
> a<-freeny.x[,4]
>else
> a<-NULL
>
>lm(freeny.y~freeny.x[,-4] +a)
>
>but it does not work with a<-NULL, whereas
>
>lm(freeny.y~freeny.x[,-4] +NULL)
>
>I don't understand why and did not find an answer in the manuals... do
>you see it? Any idea?
>
>Thanks!!
>
>______________________________________________
>R-help at 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.
More information about the R-help
mailing list