validate_age: Check whether an age is valid for CAPL-2.
Description
This function checks whether an age is valid (numeric and between 8 and 12). CAPL-2 scores and interpretations are valid for children between the ages
of 8 and 12 years.
Usage
validate_age(x)
Arguments
x
A numeric vector.
Value
Returns a numeric (integer) vector with a value between 8 and 12 (if valid) or NA (if not valid).
Details
If x contains a decimal value that is otherwise valid (e.g., 8.5, 10.1), this function will return the floor() of the value.
Other capl functions called by this function include: validate_number().