[R] Conversion of strings to expressions
jfox at mcmaster.ca
Thu Nov 4 16:34:12 CET 2004
You can use get("vec").
I hope this helps,
On Thu, 4 Nov 2004 15:00:21 +0100
Alexander Sokol <alexandersokol at ofir.dk> wrote:
> I'm not sure how to state my question in a technically accurate
> manner, so
> I'll use a short example to clarify my problem:
> Say I have a vector,
> I would like to be able to "reference" the vector by using the string
> containing the name of the vector - that is, I would like to know of
> function which is able to convert the string "vec" into the vector
> vec itself.
> The purpose of this is to be able to do something like
>  FALSE TRUE FALSE TRUE
> I hope it is clear from this what the problem is. It seems to me that
> function desired is akin to a sort of "inverse" to the quote()
> function, but I
> have been unable to find such a function.
> I am using R 1.9.1 on Windows 2000 SP4. Does anyone have a suggestion
> of how
> to solve the problem?
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
Department of Sociology
Hamilton, Ontario, Canada
More information about the R-help