[R] how to evaluate a dynamic variable?
Greg.Snow at intermountainmail.org
Fri Apr 27 23:10:55 CEST 2007
What are you trying to do with that? Most times when someone asks this
question, they are trying to accomplish something that can be done
better a different way, so if you tell us what you are trying to
accomplish, we can suggest better approaches.
The short answer to your question is ?get.
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at intermountainmail.org
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Bobby Prill
> Sent: Friday, April 27, 2007 2:35 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] how to evaluate a dynamic variable?
> Please help me evaluate a "dynamic variable" as show in the
> code snippet below.
> # regular variable
> a = c(1,2,3,4)
> # dynamic variable set at runtime
> DV = "a"
> --> a
> --> a
> # what I want
> --> 1,2,3,4
> Can someone teach me how to do this? Thanks very much.
> - Bobby
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help