[R] Can you turn a string into a (working) symbol?

andrewH ahoerner at rprogress.org
Sun Nov 4 04:10:47 CET 2012


Yes, the assign command goes a little way toward what what I was hoping for. 
But it requires a different syntax, and it does not in general let you use
quoted expressions that you could  use with other assignment operators. For
instance, 

> DD <- 1:3
> assign("DD[2]", 5)
> DD
[1] 1 2 3

So I am still looking for a function that produces an output that is fully
equivalent to the string without quotation marks.  Or for a definite
statement that no such function can exist.

Thanks so much for your attention to this problem.
andrewH




--
View this message in context: http://r.789695.n4.nabble.com/Can-you-turn-a-string-into-a-working-symbol-tp4648343p4648366.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list