[R] eval while keeping NA-s

2007-01-18 Thread Ott Toomet
Dear R-people, I would like to construct a model frame while keeping eventual NA-s in it. The code looks like in lm(): m - match(c(formula, data, subset, weights, na.action, offset), names(mf), 0) mfO - mf[c(1, m)] mfO$drop.unused.levels - TRUE mfO[[1]] -

Re: [R] eval while keeping NA-s

2007-01-18 Thread Prof Brian Ripley
On Thu, 18 Jan 2007, Ott Toomet wrote: Dear R-people, I would like to construct a model frame while keeping eventual NA-s in it. The code looks like in lm(): m - match(c(formula, data, subset, weights, na.action, offset), names(mf), 0) mfO - mf[c(1, m)]