Skip to content
Prev 303835 / 398503 Next

define subset argument for function lm as variable?

On 21/08/12 17:35, Eik Vettorazzi wrote:
Sorry  - to much garbage in my workspace left.

Just add:

rm(ctl)
rm(trt)

after the definition
this obviously works, but I would like to have:

subst <- trt>0
lm(weight ~ group, data=dat, subset=subst)

Sorry about this,

Rainer