Re: [R] all.vars for nested expressions

2013-04-29 Thread William Dunlap
Try poking around in the codetools package. E.g., you can do things like the following expr1 <- quote(a <- fn + tp) # put 'a' in the expression expr2 <- quote( tp / a + fn) expr12 <- call("{", expr1, expr2) expr12 # { #a <- fn + tp #tp/a + fn # } library(codeto

Re: [R] all.vars for nested expressions

2013-04-29 Thread Eik Vettorazzi
Hi Felix, I thought, this could be an easy task for substitute, and the following works as expected: all.vars(substitute(expression(tp/a),list(a=expression(fn+tp # [1] "tp" "fn" But (of course) all.vars(substitute(sen,list(a=a))) does not yield the desired result, and I can't figure out, how