Similar questions have been raised for other languages: C, sql, java, etc.
But I'm trying to do this in R.
I have:
ret_series <- c(1, 2, 3) x <- "ret_series"
How do I get (1, 2, 3)
by calling some function / manipulation on x
, without direct mentioning of ret_series
?
A string is a type of value that can be stored in a variable. A string is made up of characters, and can include letters, words, phrases, or symbols. Definition: Strings hold groups of characters, like a word or a phrase.
The information "stored" in a variable, is the last piece of information assigned to that variable name. After assigning into a variable, all previous information is lost.
You provided the answer in your question. Try get
.
> get(x) [1] 1 2 3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With