search for: listofvar

Displaying 2 results from an estimated 2 matches for "listofvar".

2002 Aug 05
1
constructing a formula
...trouble figuring out how to build a formula using a variable list. For example, I have: a _ data.frame(a=rnorm(1000)) a$b_rnorm(1000)+.5*a$a a$c_rnorm(1000)+.5*a$b a$d_rnorm(1000)+.5*a$b+.1*a$a attach(a) and I estimate, lm(d ~ b+c+d) BUT, I wish to construct a generalized solution in which, ListOfVar _ c('b','c','d') The question is how to leverage ListOfVar into the constuction of the formula lm(a$d ~ a$b+a$c+a$b). I know this must be fairly simple, but unfortunately my readings of the various help files/books haven't been productive yet. Any help would be apprec...
2018 Oct 15
2
sys.call() inside replacement functions incorrectly returns *tmp*
Kia Ora > Although I'm not sure what problem it would solve... Given that you asked, I was interested in writing a multiple assignment function as a replacement function, so something like: massign (x, y, z) = construct.some list () Obviously, that's not possible. Probably the best example I can think of is converting cartesian coordinates to polar coordinates. Then we might have