identifyCaseIssues: A checkFunction for identifying case issues

Description Usage Arguments Value See Also Examples

View source: R/identifyCaseIssues.R

Description

A checkFunction to be called from check that identifies values in a vector that appear multiple times with different case settings.

Usage

1
identifyCaseIssues(v, nMax = 10)

Arguments

v

A character, factor, haven_labelled or labelled variable to check.

nMax

The maximum number of problematic values to report. Default is 10. Set to Inf if all problematic values are to be included in the outputted message, or to 0 for no output.

Value

A checkResult with three entires: $problem (a logical indicating whether case issues where found), $message (a message describing which values in v resulted in case issues) and $problemValues (the problematic values in their original format). Note that Only unique problematic values are listed and they are presented in alphabetical order.

See Also

check, allCheckFunctions, checkFunction, checkResult

Examples

1
 identifyCaseIssues(c("val", "b", "1", "1", "vAl", "VAL", "oh", "OH"))

dataReporter documentation built on Nov. 11, 2021, 9:06 a.m.