For the below dataframe AB, the formula values i.e. b,c,d,e,f,z,x,y etc. are in a different dataframe lets say DF.
I wish to fill the values for each item based on corresponding formula. Using eval(parse) didn't work
Here is what I had
AB$Value<-eval(parse(text="c+d-2"),DF)
Item Value Formula
A - c+d-2
B - x+b-2
C - z+y-2
D - e+f
DF
Code Value
b 1
c 5
d 6
e 9
f 13
x 15
y 20
z 2
How do I iterate so that all values get filled based on corresponding formula?