Reputation: 161
Not completelty sure if my question is a duplicate...
Suppose I have a dataframe (X), containing 3 columns (A,B and C) with > 100 rows:
X:
A B C
5 10 20
10 8 100
...
Next, I want to use the values of each row (loop) in this dataframe in a script:
For example, in the first "loop"
A<-5
B<-10
C<-20
D<-A*B*C
The second loop
A<-10
B<-8
C<-100
D<-A*B*C
So in the end the ouput of my script contains two values
1000
8000
Anyone could help me with that?
Thank you in advance.
WD
Upvotes: 0
Views: 280