validate_steps {capl} | R Documentation |
This function checks whether daily steps as measured by a pedometer are valid. The variables from this function are used to compute step_average
and
the step score (step_score
).
validate_steps(steps = NA, wear_time = NA)
steps |
A numeric (integer) vector representing the steps taken on a given day (valid values are between 1000 and 30000). |
wear_time |
A numeric vector representing the duration of time (in decimal hours) that a pedometer was worn on a given day (valid values are >= 10.0 hours). |
Other capl
functions called by this function include: validate_scale()
and validate_number()
.
Returns the steps
argument (if valid) or NA (if not valid).
validate_steps( steps = c(5400, 11001, 999, 31000, 8796), wear_time = c(10.1, 12.6, 10.2, 10.9, 9.5) ) # [1] 5400 11001 NA NA NA