Time is often punched as HH:MM in order to preserve correct time calculations. The ipaq calculation recure time to be in decimal minutes. This function easily changes HH:MM into decminal minutes in a data.frame It alters columns directly in the data.frame

ipaq_time_alter(data, cols = c(ipaq_2, ipaq_4, ipaq_6, ipaq_7))

Arguments

data

data with columns to alter

cols

columns to alter, in tidyselect format

Value

data.frame

See also

Other ipaq_functions: ipaq_compute_met(), ipaq_mets()

Examples

dat <- data.frame(
   time_1  = c("12:34", "09:33", "22:14"),
   time_2  = c("10:55", "16:45", "18:02")
)
ipaq_time_alter(dat, cols = c(time_1, time_2))
#>   time_1 time_2
#> 1    754    655
#> 2    573   1005
#> 3   1334   1082