check_CCAPS | R Documentation |
A function used to check the validity of the CCAPS items. All CCAPS items should have values between 0 and 4, and possibly NA for missing values. This function checks whether these constraints are satisfied, and if not, returns a vector containing the CCAPS item(s) which violated these rules.
check_CCAPS(dat)
dat |
The data frame containing the new year of (combined) data. |
A vector of strings containing the names of the CCAPS variables that have
at least one value out of bounds. If no variables have values out of bounds, the
returned value will be NULL
.
CCAPSvalue_check
calls on first and last CCAPS items–CCAPS_01 and CCAPS_70
–by name, so they must be named properly in dat
. Variable naming convention is
CCAPS_01
, CCAPS_70
. If dat
does not contain the proper CCAPS
variable names (or the naming convention was changed in the new year's data), the
function will return an error. In addition, it is assumed that all CCAPS variables
exist between CCAPS_01
and CCAPS_70
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.