Fix bug that unified battery status for iOS client v2
parent
5d68b5052c
commit
e2b2643ba9
|
@ -3,6 +3,9 @@ source("packrat/init.R")
|
|||
library(dplyr)
|
||||
|
||||
unify_ios_battery <- function(ios_battery){
|
||||
# We only need to unify battery data for iOS client V1. V2 does it out-of-the-box
|
||||
# V1 will not have rows where battery_status is equal to 4
|
||||
if(nrow(ios_battery %>% filter(battery_status == 4)) == 0)
|
||||
ios_battery <- ios_battery %>%
|
||||
mutate(battery_status = replace(battery_status, battery_status == 3, 5),
|
||||
battery_status = replace(battery_status, battery_status == 1, 3))
|
||||
|
|
Loading…
Reference in New Issue