Reputation: 1
The ms.compute function in the RxnSim package requires me to specify two variables I want to compare. I am not sure how I can define the variables (i.e. ms.compute(x,y)) in the ms.compute function so that the function uses whatever is in the columns in the current row, and make the function repeat for each row, and ideally output the result in a third column.
df
X1 X2
1 1 6
2 2 7
3 3 8
4 4 9
5 5 10
For this df, I would want a third column X3 to return the result of a function like: FUN(x+y), in which x,y are 1,6 for row 1 etc. and have this function repeat for each row, so row 1 = 7, row 2 = 9 etc.
Upvotes: 0
Views: 83