search for: lmwrap

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

2008 Aug 13
1
Arguments to lm() within a function - object not found
Hi all, I'm having some difficulty passing arguments into lm() from within a function, and I was hoping someone wiser in the ways of R could tell me what I'm doing wrong. I have the following: lmwrap <- function(...) { wts <- somefunction() print(wts) # This works, wts has the values I expect fit <- lm(weights=wts,...) return(fit) } If I call my function lmwrap, I get the the following error: > lmwrap(a~b) Error in eval(expr, envir, enclos) : object "wts" not f...