Is there any way to get the last line of this code to double the contents of
a and b without naming them directly?

#create variables a and b
a<-5
b<-10

#store variable names a and b in variables c and d
c<-"a"
d<-"b"

e<-c(c,d)

#loop through both variables
for (i in e){

#print the numbers five and ten using only the variables c and d
#this line works fine
print(eval(parse(text=i)))*2

#re-assign variables a and b using only variables c and d
#this line does not work -
parse(text=i) <- eval(parse(text=i))*2
}

	[[alternative HTML version deleted]]

