get_pacer_20m_laps {capl}R Documentation

Convert PACER shuttle run laps to their equivalent in 20-metre laps.

Description

This function converts PACER (Progressive Aerobic Cardiovascular Endurance Run) shuttle run laps to their equivalent in 20-metre laps (pacer_laps_20m). If laps are already 20-metre laps, they are returned unless outside the valid range (1-229). This variable is used to compute the PACER score (pacer_score).

Usage

get_pacer_20m_laps(lap_distance = NA, laps_run = NA)

Arguments

lap_distance

A numeric (integer) vector (valid values are 15 or 20).

laps_run

A numeric (integer) vector (if lap_distance = 15, valid values are integers between 1 and 298; if lap_distance = 20, valid values are integers between 1 and 229).

Details

Other capl functions called by this function include: validate_integer() and validate_scale().

Value

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

Examples

get_pacer_20m_laps(
  lap_distance = c(15, 20, NA, "15", 20.5), 
  laps_run = rep(100, 5)
)

# [1]  77 100  NA  77  NA


[Package capl version 1.39 Index]