Function to look for occurrences of a specific value in a GADSdat
.
Usage
checkValue(GADSdat, value, vars = namesGADS(GADSdat))
Details
The function checks occurrences of a specific value in a set of variables (default: all variables) in the GADSdat
and outputs a vector
containing the count of occurrences for all variables in which the value occurs. It explicitly supports checking for NA
.
Examples
# for all variables in the data
checkValue(pisa, value = 99)
#> idstud idschool
#> 1 1
# only for specific variables in the data
checkValue(pisa, vars = c("idschool", "g8g9"), value = 99)
#> idschool
#> 1