From: Thomas Lumley (firstname.lastname@example.org)
Date: Mon 09 Apr 2001 - 09:57:48 EST
On Sat, 7 Apr 2001 email@example.com wrote:
> I am trying to replicate part of the function of the
> S-Plus terms.inner function. I don't need an entire
> model terms object but R expressions or character
> strings containing the innermost variable name given
> a vector of character strings or expressions. Here
> are some example inputs that each should result in the
> string or expression "x":
> x; x^2; g(x); h(g(x)); h(g(x^3)); j(h(g(pmin(x,3))))
> To anyone who meets the challenge, thanks!
You're looking for all.vars(). It works on a formula, terms, or expression
 "x" "y"
Thomas Lumley Asst. Professor, Biostatistics
firstname.lastname@example.org University of Washington, Seattle
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: email@example.com
This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:38 EST