View source: R/daily_behaviour.R
| get_pedometer_wear_time | R Documentation | 
This function computes pedometer wear time in decimal hours for a given day (e.g., wear_time1). This variable is used to compute the step_average
variable and the step score (step_score).
get_pedometer_wear_time(time_on = NA, time_off = NA, non_wear_time = NA)
time_on | 
 A character vector representing the time (in 12- or 24-hour clock format) when the pedometer was first worn on a given day.  | 
time_off | 
 A character vector representing the time (in 12- or 24-hour clock format) when the pedometer was removed at the end of a given day.  | 
non_wear_time | 
 A numeric vector representing the total time (in minutes) the pedometer was not worn during waking hours on a given day.  | 
Other capl functions called by this function include: get_24_hour_clock() and validate_number().
Returns a numeric vector with values >= 0 (if valid) or NA (if not valid).
get_pedometer_wear_time(
  time_on = c("6:23", "5:50 am", NA),
  time_off = c("21:37", "9:17pm", ""),
  c(60, 90, 0)
)
# [1] 14.23 13.95    NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.