check_CLICC: CLICC Variable Check

View source: R/check_CLICC.R

check_CLICCR Documentation

CLICC Variable Check

Description

A function used to check the validity of the CLICC items. For CLICC_01_01 through CLICC_01_44, all values should be either 1 or NA. For CLICC_03, values between 0 and 44, as well as NA for missing values, are tolerated. This function checks whether these constraints are satisfied, and if not, returns a vector containing the names of the CLICC item(s) which violated these rules.

Usage

check_CLICC(dat)

Arguments

dat

The data frame containing the new year of (combined) data.

Note

CLICCvalue_check calls on CLICC_01_01, CLICC_01_44, and CLICC_03 by name, so they must be named properly in dat. All other CLICC items follow the same naming convention as CLICC_01_01 (e.g. CLICC_01_02, ...). If dat does not contain the proper CLICC 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 CLICC variables exist between CLICC_01_01 and CLICC_01_44, with the exception of CLICC_03.


jpetrovich02/CCMHr documentation built on Jan. 25, 2024, 11:57 p.m.