Q:

Convert string to a variable name

I am using R to parse a list of strings in the form:
original_string <- "variable_name=variable_value"

First, I extract the variable name and value from the original string and convert the value to numeric class. 
parameter_value <- as.numeric("variable_value")
parameter_name <- "variable_name"

Then, I would like to assign the value to a variable with the same name as the parameter_name string.
variable_name <- parameter_value

What is/are the function(s) for doing this?

A:

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

A:

You can use do.call:
 do.call("<-",list(parameter_name, parameter_value))

A:

There is another simple solution found there: 
http://www.r-bloggers.com/converting-a-string-to-a-variable-name-on-the-fly-and-vice-versa-in-r/
To convert a string to a variable:
x <- 42
eval(parse(text = "x"))
[1] 42

And the opposite:
x <- 42
deparse(substitute(x))
[1] "x"

