Re: [Rd] challenge: using 'subset = ' inside function ..

2005-11-19 Thread Bjørn-Helge Mevik
Hmm.. Maybe I'm overlooking something, but why not use do.call()? For instance tst <- function(formula, data, na.action = na.omit) { stopifnot(inherits(formula,"formula"), length(formula) == 3) ## I want to fit a model to those observations that have 'Y > 0' ## where 'Y' is the left-h

[Rd] challenge: using 'subset = ' inside function ..

2005-11-18 Thread Martin Maechler
I've been asked by someone else whom I originally taught `` to just work with substitute() and then all will be fine'' ... But it looks to me that I've been caught here. Is it possible to make this work along the way we thought it should? 1) Inside a function, say tst() with the 'formula' and