Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Row No. Process UserName ActivityName Units StartTime
- 1 XYZ UserA Activity1 2 8/10/2017 11:40:37
- 2 XYZ UserA Activity1 2 8/10/2017 11:41:39
- 3 XYZ UserA Activity1 2 8/10/2017 11:42:41
- 4 XYZ UserA Activity2 3 8/10/2017 11:43:44
- 5 XYZ UserA Activity2 3 8/10/2017 11:49:37
- 6 XYZ UserA Activity1 2 8/10/2017 11:54:21
- 7 XYZ UserA Activity1 2 8/10/2017 11:58:21
- 8 XYZ UserA Activity2 4 8/10/2017 11:59:21
- Process UserName ActivityName Units Time in Secs Time per Unit
- XYZ UserA Activity1 4 487 121.75
- XYZ UserA Activity2 7 638 91.14
- df$EndTime= c(df$StartTime[-1],0)
- DT = df
- CalculatedSummary = DT[,.(sum(TimeinSecs),.N),by=.(Process,UserName,ActivityName,Unit1)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement