On Sun, 24 Oct 2010, Erik Iverson wrote:
Hello,
How would you go about handling the following situation?
This is on R 2.12.0 on Ubuntu 32-bit.
I have a wrapper function to lm. I want to pass in a
subset argument. First, I just thought I'd use
The subset arg needs to be unevaluated
As workaround you can try this:
testlm - function(formula, ...) {
args - list(formula, data = df1, ...)
do.call(lm, args)
}
testlm(bmi ~ age, subset = df1$age 50)
On Mon, Oct 25, 2010 at 2:16 AM, Erik Iverson er...@ccbr.umn.edu wrote:
Hello,
How would you go about handling the
Hello,
How would you go about handling the following situation?
This is on R 2.12.0 on Ubuntu 32-bit.
I have a wrapper function to lm. I want to pass in a
subset argument. First, I just thought I'd use
## make example reproducible
set.seed(123)
df1 - data.frame(age = rnorm(100, 50, 10),
3 matches
Mail list logo