This is my dataframe SHORT:
ID IDaxis Y Date-Time Tdiff
1 1 5 2012-06-11 13:10:30 0.00
1 1 10 2012-06-11 15:10:30 2.00
1 1 20 2012-06-11 17:10:30 2.00
1 3 15 2012-06-11 13:20:30 0.00
1 3 30 2012-06-11 14:20:30 1.00
1 3 45 2012-06-11 17:20:30 3.00
1 6 9 2012-06-11 13:35:30 0.00
1 6 15 2012-06-11 15:35:30 2.00
1 6 30 2012-06-11 18:35:30 3.00
3 2 8 2012-06-11 13:50:30 0.00
3 2 14 2012-06-11 14:55:30 1.083
3 2 20 2012-06-11 16:55:30 2.00
3 2 30 2012-06-11 19:00:30 2.083
3 5 10 2012-06-11 13:40:30 0.00
3 5 15 2012-06-11 16:45:30 3.083
ID - plant
IDaxis - plant leaf
Y - length of leaf
Date - Time - date and time of measurement
Tdiff - time(h) interval between measurement
I want to do (Example SHORT1):
1) sum up Tdiff for IDaxis in column SHORT$Ttot
2) calculate difference between row in Y for IDaxis in column SHORT$Ydiff
3) sum up Ydiff for IDaxis in column SHORT$Ytot
Example SHORT1:
Ydiff - length interval between measurement
Ytot - sum of length interval from measurement to measurement
Ttot - sum of time interval from measurement to measurement
I know how to calculate this for IDaxis if I split dataframe. My problem is that I have three dataframe each 700 ID, each have 100 IDaxis. I don't know how to do it automaticly for whole dataframe. Thank You in advance.