Fix column name for gar deltas

replace/c1ea20d9e1d3187e8aac44fbe1c03b596bba6dd9
JulioV 2019-11-27 16:06:30 -05:00
parent e6d418cd14
commit e5390ee0e2
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ if(nrow(gar) > 0){
mutate(activity_episode = cumsum(c(1, head(activity_type, -1) != tail(activity_type, -1)))) %>%
group_by(activity_episode) %>%
filter(n() > 1) %>%
summarize(episode = first(activity_name),
summarize(activity = first(activity_name),
time_diff = (last(timestamp) - first(timestamp)) / (1000 * 60),
local_start_date_time = first(local_date_time),
local_end_date_time = last(local_date_time),
@ -20,7 +20,7 @@ if(nrow(gar) > 0){
local_end_day_segment = last(local_day_segment)) %>%
select(-activity_episode)
} else {
activity_episodes <- data.frame(episode = character(),
activity_episodes <- data.frame(activity = character(),
time_diff = numeric(),
local_start_date_time = character(),
local_end_date_time = character(),