search for: testlm2

Displaying 1 result from an estimated 1 matches for "testlm2".

Did you mean: testlm
2010 Oct 25
2
Question on passing the subset argument to an lm wrapper
...t; testlm(bmi ~ age, subset = age > 50) Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in I found some other examples of this error message, but couldn't piece together how it fits in with this example. Next, I tried specifying a subset argument. testlm2 <- function(formula, subset) { lm(formula, data = df1, subset = subset) } > testlm2(bmi ~ age, subset = age > 50) Error in xj[i] : invalid subscript type 'closure' I also don't understand this one. Any pointers on if I'm just missing the easy solution to do what I w...