Learn R Programming

capl (version 1.39)

get_step_score: Compute a step score.

Description

This function computes a step score (step_score) based on the average daily steps taken as measured by a pedometer. This score is used to compute the daily behaviour domain score (db_score).

Usage

get_step_score(step_average = NA)

Arguments

step_average

A numeric vector representing average daily steps taken. See get_step_average().

Value

Returns a numeric (integer) vector with values between 0 and 25 (if valid) or NA (if not valid).

Details

Other capl functions called by this function include: validate_number().

Examples

Run this code
# NOT RUN {
capl_demo_data <- get_capl_demo_data(10)

step_average <- get_step_average(capl_demo_data)$step_average

get_step_score(step_average)

# [1] 25 18 22 18 15 20 25 20 24 15

# }

Run the code above in your browser using DataLab