assign is what you are looking for.
assign("x", 5)
x
[1] 5
but buyer beware.
See R FAQ 7.21
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-turn-a-string-into-a-variable_003f
More Related Contents:
- Making a string concatenation operator in R
- Removing html tags from a string in R
- How to split a string into substrings of a given length? [duplicate]
- How to convert variable (object) name into String [duplicate]
- Load R package from character string
- Getting and removing the first character of a string
- pass character strings to ggplot2 within a function
- Insert a character at a specific location in a string
- Convert R vector to string vector of 1 element [duplicate]
- as.numeric with comma decimal separators?
- Count word occurrences in R
- converting datetime string to POSIXct date/time format in R
- Extract numeric part of strings of mixed numbers and characters in R
- Use character string as function argument
- How can I remove repeated characters in a string with R?
- How to collapse a list of characters into a single string in R
- Split a character vector into individual characters? (opposite of paste or stringr::str_c)
- Repeat and concatenate a string N times
- Extract the first (or last) n characters of a string
- Insert line breaks in long string — word wrap
- How to combine multiple character columns into a single column in an R data frame
- Ignore escape characters (backslashes) in R strings
- What is the difference between \r\n, \r, and \n? [duplicate]
- Ukkonen’s suffix tree algorithm in plain English
- How many bytes does one Unicode character take?
- Shell script – remove first and last quote (“) from a variable
- Number of Occurrences of a Character in NSString
- Is there a way to create a String from utf16 array in swift?
- How can I use a dynamic format string with the format! macro?
- Remove square brackets from a string vector