[R] Can you turn an input into a variable name?

April Ettington @pr||ett|ngton @end|ng |rom gm@||@com
Fri Oct 4 08:58:51 CEST 2019

Let's say I am parsing a file with a list of parameters followed by an
equal sign, and their corresponding values, eg:


and I want to use this information to create a variable called color with
the value 'green' and a variable shape with the value 'circle'.  However, I
also want my code to be able to do this *when it doesn't know up front what
the parameter names will be.  *So, if the file also included "age=7", it
should still make a variable called age with the value '7', even though
'age' doesn't specifically appear anywhere in my code.  Is there a way to
do this?

Thank you,

	[[alternative HTML version deleted]]

More information about the R-help mailing list