>

80 초 간격의 타임 스탬프 데이터를 4 분 (240 초) 간격으로 변환해야합니다.

내가 가진 두 가지 주요 과제는 많은 수의 열이며, 몇 가지 간격이 80 초가 아니라는 사실 때문에 도움이 필요합니다. 아래는 head() 입니다  내 데이터 세트 샘플 :

> head(dataraw)
     GMT_DATE GMT_TIME ACTIVITY_X ACTIVITY_Y ACTIVITY_Z Vigilance Head-up Grazing Browsing Moving
1: 06/17/2018 09:36:00         78         38         87         0      35       0       35      1
2: 06/17/2018 09:37:20         18         17         25         0      46       0        0     26
3: 06/17/2018 09:38:40          7          4          8         0      69       0        0      0
4: 06/17/2018 09:40:00          4          0          4         0      70       0        0      0
5: 06/17/2018 09:41:20         11          8         14         0      29       0        0     11
6: 06/17/2018 09:42:40         27         20         34         0       0      58        0      0
   Grooming Resting Fleeing Unknown End Total
1:        4       0       0       5   0    80
2:        8       0       0       0   0    80
3:        5       0       0       6   0    80
4:       10       0       0       0   0    80
5:       15       0       0      25   0    80
6:       10       0       0      12   0    80

알다시피, 타임 스탬프는 80 초마다 촬영되었지만 일부 타임 스탬프는 5 행에서 아래와 같이 160 초입니다.  그리고 6 :

> head(dataraw[c(3626:3632),])
     GMT_DATE GMT_TIME ACTIVITY_X ACTIVITY_Y ACTIVITY_Z Vigilance Head-up Grazing Browsing Moving
1: 06/20/2018 18:09:20          0          0          0         0       0       0        0      0
2: 06/20/2018 18:10:40          0          0          0         0       0       0        0      0
3: 06/20/2018 18:12:00          1          0          1         0       0       0        0      0
4: 06/20/2018 18:13:20          0          0          0         0       0       0        0      0
5: 06/20/2018 18:14:40          0          0          0         0       0       0        0      0
6: 06/20/2018 18:17:20          4          0          4         0       0       0        0      0
   Grooming Resting Fleeing Unknown End Total
1:        0       0       0       0  80    80
2:        0       0       0       0  80    80
3:        0       0       0       0  80    80
4:        0       0       0       0  80    80
5:        0       0       0       0  80    80
6:        0       0       0       0  80    80

따라서 내가 할 수있는 최선은 00 가있는 타임 스탬프를 기준으로 집계하는 것입니다.  그들의 seconds 에서  체재. 그것은 09:36:00 에서 간다 09:40:0009:44:00 에  등.

어떻게하면 되나요?

ACTIVITY_X 열의 값은 ACTIVITY_Y  그리고 ACTIVITY_Z 병합시 평균을 구해야합니다. 나머지 열의 경우 집계 될 때 값을 합할 수 있습니다. 열 Total  그러면 4 분 간격 (240 초) 동안 240이 표시됩니다.

누군가가 나를 올바른 길로 인도 할 수 있기를 바랍니다. 모든 의견은 진심으로 감사합니다!

> dput(dataraw[(1:280),])
structure(list(GMT_DATE = c("06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", "06/17/2018", 
"06/17/2018", "06/17/2018"), GMT_TIME = c("09:36:00", "09:37:20", 
"09:38:40", "09:40:00", "09:41:20", "09:42:40", "09:44:00", "09:45:20", 
"09:46:40", "09:48:00", "09:49:20", "09:50:40", "09:52:00", "09:53:20", 
"09:54:40", "09:56:00", "09:57:20", "09:58:40", "10:00:00", "10:01:20", 
"10:02:40", "10:04:00", "10:05:20", "10:06:40", "10:08:00", "10:09:20", 
"10:10:40", "10:12:00", "10:13:20", "10:14:40", "10:16:00", "10:17:20", 
"10:18:40", "10:20:00", "10:21:20", "10:22:40", "10:24:00", "10:25:20", 
"10:26:40", "10:28:00", "10:29:20", "10:30:40", "10:32:00", "10:33:20", 
"10:34:40", "10:36:00", "10:37:20", "10:38:40", "10:40:00", "10:41:20", 
"10:42:40", "10:44:00", "10:45:20", "10:46:40", "10:48:00", "10:49:20", 
"10:50:40", "10:52:00", "10:53:20", "10:54:40", "10:56:00", "10:57:20", 
"10:58:40", "11:00:00", "11:01:20", "11:02:40", "11:04:00", "11:05:20", 
"11:06:40", "11:08:00", "11:09:20", "11:10:40", "11:12:00", "11:13:20", 
"11:14:40", "11:16:00", "11:17:20", "11:18:40", "11:20:00", "11:21:20", 
"11:22:40", "11:24:00", "11:25:20", "11:26:40", "11:28:00", "11:29:20", 
"11:30:40", "11:32:00", "11:33:20", "11:34:40", "11:36:00", "11:37:20", 
"11:38:40", "11:40:00", "11:41:20", "11:42:40", "11:44:00", "11:45:20", 
"11:46:40", "11:48:00", "11:49:20", "11:50:40", "11:52:00", "11:53:20", 
"11:54:40", "11:56:00", "11:57:20", "11:58:40", "12:00:00", "12:01:20", 
"12:02:40", "12:04:00", "12:05:20", "12:06:40", "12:08:00", "12:09:20", 
"12:10:40", "12:12:00", "12:13:20", "12:14:40", "12:16:00", "12:17:20", 
"12:18:40", "12:20:00", "12:21:20", "12:22:40", "12:24:00", "12:25:20", 
"12:26:40", "12:28:00", "12:29:20", "12:30:40", "12:32:00", "12:33:20", 
"12:34:40", "12:36:00", "12:37:20", "12:38:40", "12:40:00", "12:41:20", 
"12:42:40", "12:44:00", "12:45:20", "12:46:40", "12:48:00", "12:49:20", 
"12:50:40", "12:52:00", "12:53:20", "12:54:40", "12:56:00", "12:57:20", 
"12:58:40", "13:00:00", "13:01:20", "13:02:40", "13:04:00", "13:05:20", 
"13:06:40", "13:08:00", "13:09:20", "13:10:40", "13:12:00", "13:13:20", 
"13:14:40", "13:16:00", "13:17:20", "13:18:40", "13:20:00", "13:21:20", 
"13:22:40", "13:24:00", "13:25:20", "13:26:40", "13:28:00", "13:29:20", 
"13:30:40", "13:32:00", "13:33:20", "13:34:40", "13:36:00", "13:37:20", 
"13:38:40", "13:40:00", "13:41:20", "13:42:40", "13:44:00", "13:45:20", 
"13:46:40", "13:48:00", "13:49:20", "13:50:40", "13:52:00", "13:53:20", 
"13:54:40", "13:56:00", "13:57:20", "13:58:40", "14:00:00", "14:01:20", 
"14:02:40", "14:04:00", "14:05:20", "14:06:40", "14:08:00", "14:09:20", 
"14:10:40", "14:12:00", "14:13:20", "14:14:40", "14:16:00", "14:17:20", 
"14:18:40", "14:20:00", "14:21:20", "14:22:40", "14:24:00", "14:25:20", 
"14:26:40", "14:28:00", "14:29:20", "14:30:40", "14:32:00", "14:33:20", 
"14:34:40", "14:36:00", "14:37:20", "14:38:40", "14:40:00", "14:41:20", 
"14:42:40", "14:44:00", "14:45:20", "14:46:40", "14:48:00", "14:49:20", 
"14:50:40", "14:52:00", "14:53:20", "14:54:40", "14:56:00", "14:57:20", 
"14:58:40", "15:00:00", "15:01:20", "15:02:40", "15:04:00", "15:05:20", 
"15:06:40", "15:08:00", "15:09:20", "15:10:40", "15:12:00", "15:13:20", 
"15:14:40", "15:16:00", "15:17:20", "15:18:40", "15:20:00", "15:21:20", 
"15:22:40", "15:24:00", "15:25:20", "15:26:40", "15:28:00", "15:29:20", 
"15:30:40", "15:32:00", "15:33:20", "15:34:40", "15:36:00", "15:37:20", 
"15:38:40", "15:40:00", "15:41:20", "15:42:40", "15:44:00", "15:45:20", 
"15:46:40", "15:48:00"), ACTIVITY_X = c(78L, 18L, 7L, 4L, 11L, 
27L, 19L, 23L, 21L, 19L, 24L, 25L, 13L, 15L, 31L, 52L, 71L, 141L, 
103L, 59L, 43L, 85L, 129L, 81L, 106L, 86L, 129L, 82L, 67L, 145L, 
120L, 95L, 97L, 139L, 160L, 147L, 83L, 102L, 84L, 90L, 92L, 84L, 
95L, 121L, 84L, 58L, 72L, 72L, 52L, 65L, 83L, 57L, 61L, 72L, 
82L, 88L, 116L, 125L, 126L, 79L, 49L, 51L, 77L, 84L, 99L, 96L, 
90L, 72L, 74L, 61L, 86L, 71L, 52L, 24L, 52L, 55L, 53L, 37L, 49L, 
57L, 58L, 59L, 45L, 53L, 72L, 49L, 60L, 77L, 79L, 93L, 110L, 
76L, 108L, 63L, 78L, 78L, 83L, 66L, 40L, 30L, 75L, 29L, 30L, 
37L, 39L, 38L, 41L, 48L, 16L, 58L, 75L, 81L, 85L, 64L, 51L, 31L, 
33L, 76L, 65L, 76L, 63L, 75L, 59L, 60L, 44L, 54L, 51L, 68L, 75L, 
93L, 82L, 83L, 86L, 79L, 67L, 59L, 94L, 75L, 47L, 28L, 66L, 58L, 
53L, 34L, 31L, 40L, 35L, 45L, 33L, 47L, 42L, 24L, 25L, 26L, 21L, 
26L, 30L, 47L, 34L, 28L, 31L, 48L, 33L, 45L, 33L, 41L, 40L, 44L, 
53L, 25L, 38L, 27L, 44L, 96L, 42L, 55L, 49L, 44L, 46L, 45L, 51L, 
58L, 36L, 27L, 35L, 53L, 44L, 44L, 60L, 29L, 36L, 38L, 39L, 36L, 
37L, 32L, 23L, 35L, 46L, 58L, 63L, 67L, 166L, 123L, 44L, 53L, 
68L, 43L, 48L, 61L, 48L, 65L, 54L, 69L, 67L, 62L, 51L, 49L, 41L, 
42L, 39L, 58L, 40L, 52L, 46L, 38L, 48L, 28L, 32L, 48L, 42L, 39L, 
90L, 108L, 44L, 40L, 22L, 38L, 22L, 45L, 32L, 27L, 23L, 13L, 
53L, 32L, 45L, 62L, 55L, 48L, 10L, 2L, 11L, 29L, 52L, 18L, 17L, 
17L, 10L, 1L, 33L, 19L, 22L, 10L, 23L, 46L, 81L, 115L, 97L, 111L, 
75L, 44L, 75L, 86L, 35L, 32L, 24L, 18L, 20L, 29L), ACTIVITY_Y = c(38L, 
17L, 4L, 0L, 8L, 20L, 11L, 11L, 8L, 13L, 16L, 23L, 4L, 8L, 21L, 
46L, 105L, 133L, 131L, 64L, 34L, 76L, 94L, 51L, 80L, 58L, 69L, 
47L, 57L, 108L, 102L, 80L, 71L, 127L, 135L, 114L, 116L, 131L, 
100L, 77L, 131L, 127L, 72L, 114L, 87L, 54L, 97L, 88L, 43L, 45L, 
84L, 62L, 91L, 87L, 114L, 94L, 76L, 97L, 81L, 155L, 49L, 72L, 
89L, 125L, 113L, 63L, 66L, 78L, 82L, 44L, 96L, 53L, 47L, 20L, 
35L, 42L, 46L, 31L, 38L, 45L, 37L, 42L, 34L, 28L, 86L, 55L, 42L, 
62L, 63L, 113L, 95L, 131L, 215L, 79L, 90L, 43L, 42L, 54L, 47L, 
24L, 96L, 31L, 34L, 24L, 46L, 36L, 42L, 59L, 13L, 73L, 73L, 94L, 
109L, 89L, 28L, 26L, 38L, 105L, 60L, 129L, 48L, 59L, 81L, 67L, 
51L, 36L, 81L, 154L, 74L, 80L, 81L, 79L, 83L, 57L, 47L, 62L, 
75L, 57L, 43L, 33L, 66L, 58L, 81L, 20L, 16L, 27L, 25L, 34L, 15L, 
30L, 31L, 9L, 24L, 18L, 19L, 22L, 21L, 63L, 33L, 15L, 15L, 43L, 
25L, 28L, 23L, 30L, 21L, 24L, 40L, 18L, 35L, 16L, 37L, 120L, 
27L, 45L, 42L, 33L, 45L, 36L, 32L, 36L, 35L, 22L, 24L, 31L, 38L, 
32L, 46L, 21L, 22L, 20L, 22L, 21L, 25L, 22L, 18L, 22L, 26L, 43L, 
83L, 103L, 239L, 165L, 49L, 47L, 41L, 27L, 33L, 36L, 26L, 46L, 
25L, 36L, 55L, 42L, 41L, 39L, 16L, 25L, 22L, 43L, 28L, 36L, 30L, 
19L, 19L, 13L, 16L, 41L, 37L, 117L, 132L, 45L, 45L, 23L, 19L, 
29L, 19L, 55L, 43L, 38L, 15L, 11L, 52L, 28L, 32L, 45L, 71L, 53L, 
4L, 1L, 8L, 17L, 42L, 12L, 9L, 6L, 5L, 0L, 30L, 16L, 16L, 19L, 
51L, 68L, 111L, 108L, 105L, 97L, 69L, 22L, 54L, 80L, 22L, 19L, 
20L, 29L, 15L, 22L), ACTIVITY_Z = c(87L, 25L, 8L, 4L, 14L, 34L, 
22L, 25L, 22L, 23L, 29L, 34L, 14L, 17L, 37L, 69L, 127L, 194L, 
167L, 87L, 55L, 114L, 160L, 96L, 133L, 104L, 146L, 95L, 88L, 
181L, 157L, 124L, 120L, 188L, 209L, 186L, 143L, 166L, 131L, 118L, 
160L, 152L, 119L, 166L, 121L, 79L, 121L, 114L, 67L, 79L, 118L, 
84L, 110L, 113L, 140L, 129L, 139L, 158L, 150L, 174L, 69L, 88L, 
118L, 151L, 150L, 115L, 112L, 106L, 110L, 75L, 129L, 89L, 70L, 
31L, 63L, 69L, 70L, 48L, 62L, 73L, 69L, 72L, 56L, 60L, 112L, 
74L, 73L, 99L, 101L, 146L, 145L, 151L, 241L, 101L, 119L, 89L, 
93L, 85L, 62L, 38L, 122L, 42L, 45L, 44L, 60L, 52L, 59L, 76L, 
21L, 93L, 105L, 124L, 138L, 110L, 58L, 40L, 50L, 130L, 88L, 150L, 
79L, 95L, 100L, 90L, 67L, 65L, 96L, 168L, 105L, 123L, 115L, 115L, 
120L, 97L, 82L, 86L, 120L, 94L, 64L, 43L, 93L, 82L, 97L, 39L, 
35L, 48L, 43L, 56L, 36L, 56L, 52L, 26L, 35L, 32L, 28L, 34L, 37L, 
79L, 47L, 32L, 34L, 64L, 41L, 53L, 40L, 51L, 45L, 50L, 66L, 31L, 
52L, 31L, 57L, 154L, 50L, 71L, 65L, 55L, 64L, 58L, 60L, 68L, 
50L, 35L, 42L, 61L, 58L, 54L, 76L, 36L, 42L, 43L, 45L, 42L, 45L, 
39L, 29L, 41L, 53L, 72L, 104L, 123L, 291L, 206L, 66L, 71L, 79L, 
51L, 58L, 71L, 55L, 80L, 60L, 78L, 87L, 75L, 65L, 63L, 44L, 49L, 
45L, 72L, 49L, 63L, 55L, 42L, 52L, 31L, 36L, 63L, 56L, 123L, 
160L, 117L, 63L, 46L, 29L, 48L, 29L, 71L, 54L, 47L, 27L, 17L, 
74L, 43L, 55L, 77L, 90L, 72L, 11L, 2L, 14L, 34L, 67L, 22L, 19L, 
18L, 11L, 1L, 45L, 25L, 27L, 21L, 56L, 82L, 137L, 158L, 143L, 
147L, 102L, 49L, 92L, 117L, 41L, 37L, 31L, 34L, 25L, 36L), Vigilance = c(0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 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 12L, 39L, 0L, 0L, 0L, 0L, 0L, 0L, 
    8L, 1L, 0L, 0L, 6L, 0L, 12L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
    ), End = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 31L, 80L, 
    80L, 80L, 39L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 37L, 19L, 
    0L, 0L, 0L, 0L, 0L, 0L, 58L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 19L, 0L, 0L, 0L, 0L, 69L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 39L, 0L, 0L, 0L, 
    0L, 41L, 80L, 80L, 80L, 39L, 0L, 0L, 0L, 79L, 80L, 39L, 14L, 
    59L, 34L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 39L, 0L
    ), Total = c(80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 80L, 
    80L, 80L, 80L, 80L, 80L, 80L, 80L)), row.names = c(NA, -280L
), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x0000000006b01ef0>)

  • 답변 # 1

    두 번째 열이 그룹 인덱스 인 가능한 모든 시간 (예 : 초 없음)으로 테이블을 생성 한 다음이 인공 인덱스에 의해 최종 집계에서 dplyr에서 원래 테이블로 left_join을 수행하십시오. Btw, 그렇게하는 것이 매우 편리합니다. ggplot에서 플롯을 만들 계획이라면 aes (x = .., y = .., col = index)

  • 답변 # 2

    먼저 표준으로 작성하십시오. GMT_DATE, GMT_TIME 열의 POSIXct 형식 그런 다음

    time_seq_by_seconds = seq(as.POSIXct("2017-06-17 09:36:00"), as.POSIXct("2017-06-24 10:04:00"), 1)
    number_of_groups = round(length(time_seq_by_seconds) / 80) +1
    groups = do.call(c, lapply(1:number_of_groups, function(x){ rep(x,80)} ))
    groups = groups[1:length(time_seq_by_seconds)]
    indexed = as.data.frame(cbind(as.character(time_seq_by_seconds), groups))
    colnames(indexed) = c("datetime","group")
    library(dplyr)
    joined = left_join(dataraw, indexed, by = c("GMT_DATETIME" = "datetime"))
    
    

  • 답변 # 3

    날짜-시간을 다루는 해키 방식을 사용하는 대신 POSIXct 로 취급하십시오  사물. 우리는 GMT_DATE 를 결합 할 수 있습니다  그리고 GMT_TIME  하나의 datetime 로  열을 실제 날짜 시간 개체로 변환하십시오. cut 를 사용하여 각각 4 분 간격의 그룹을 만들 수 있습니다.  그런 다음 sum  그들 모두 함께. 추가 열 row 를 만들었습니다.  "ACTIVITY"열의 평균을 계산하는 데 사용할 수있는 값이 1입니다.

    library(dplyr)
    dataraw %>%
      tidyr::unite(datetime, GMT_DATE, GMT_TIME, sep = " ") %>%
      mutate(datetime = as.POSIXct(datetime, format = "%m/%d/%Y %H:%M:%S"), 
             row = 1) %>%
      group_by(group = cut(datetime, breaks = "4 mins")) %>%
      summarise_at(-1, sum) %>%
      mutate_at(vars(starts_with("ACTIVITY")), ~. /row) %>%
      ungroup() %>%
      select(-row) 
    # A tibble: 94 x 15
    #    group ACTIVITY_X ACTIVITY_Y ACTIVITY_Z Vigilance `Head-up` Grazing Browsing..
    #  <fct>      <dbl>      <dbl>      <dbl>     <int>     <int>   <int>    <int>    
    # 1 2018…       34.3      19.7        40           0       150       0       35...
    # 2 2018…       14         9.33       17.3         0        99      58        0...
    # 3 2018…       21        10          23           0         8     205        0...
    # 4 2018…       22.7      17.3        28.7         0         0      38        0...
    # 5 2018…       19.7      11          22.7         0        41       0        0... 
    # 6 2018…       88        94.7       130           7       225       0        0... 
    # 7 2018…       68.3      76.3       103          18       199       0        0...  
    # 8 2018…       98.3      73.7       123.          0        38      63        0...
    # 9 2018…      107        69         128.          0         3     164        0...  
    #10 2018…       98        70.7       121.          0        12     144       21... 
    # … with 84 more rows, and 3 more variables: Unknown <int>, End <int>, Total <int>
    
    

  • 이전 bigdata - Cassandra, 하위 쿼리를 실행하는 효율적인 방법은 무엇입니까
  • 다음 kubernetes - 기존 영구 볼륨 클레임을 재사용하는 방법