checkValue {eatGADS}R Documentation

Check for a specific value

Description

Function to look for occurrences of a specific value in a GADSdat.

Usage

checkValue(GADSdat, value, vars = namesGADS(GADSdat))

Arguments

GADSdat

GADSdat object imported via eatGADS.

value

Single string indicating how missing labels are commonly named in the value labels.

vars

Character vector with the variable names to which checkValue should be applied.

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.

Value

A named integer.

Examples

# for all variables in the data
checkValue(pisa, value = 99)

# only for specific variables in the data
checkValue(pisa, vars = c("idschool", "g8g9"), value = 99)


[Package eatGADS version 1.1.0 Index]