Add local_day_segment to battery deltas
parent
f7be15ea9e
commit
30f814887d
|
@ -15,7 +15,8 @@ if(nrow(battery) > 0){
|
||||||
local_start_date_time = first(local_date_time),
|
local_start_date_time = first(local_date_time),
|
||||||
local_end_date_time = last(local_date_time),
|
local_end_date_time = last(local_date_time),
|
||||||
local_start_date = first(local_date),
|
local_start_date = first(local_date),
|
||||||
local_end_date = last(local_date)) %>%
|
local_end_date = last(local_date),
|
||||||
|
local_day_segment = first(local_day_segment)) %>%
|
||||||
select(-group_id) %>%
|
select(-group_id) %>%
|
||||||
filter(time_diff > 0.1) # Avoids including quick cycles
|
filter(time_diff > 0.1) # Avoids including quick cycles
|
||||||
} else {
|
} else {
|
||||||
|
@ -24,7 +25,8 @@ if(nrow(battery) > 0){
|
||||||
local_start_date_time = character(),
|
local_start_date_time = character(),
|
||||||
local_end_date_time = character(),
|
local_end_date_time = character(),
|
||||||
local_start_date = character(),
|
local_start_date = character(),
|
||||||
local_end_date = character())
|
local_end_date = character(),
|
||||||
|
local_day_segment = character())
|
||||||
}
|
}
|
||||||
|
|
||||||
write.csv(consumption, snakemake@output[[1]], row.names = FALSE)
|
write.csv(consumption, snakemake@output[[1]], row.names = FALSE)
|
||||||
|
|
Loading…
Reference in New Issue