checkFunction to be called from
check for identifying numeric variables that have
been misclassified as categorical.
A character, factor, or (haven_)labelled variable to check.
An integer determining how many unique values a variable must have
before it can potentially be determined to be a misclassified numeric variable.
The default is
Not in use.
A categorical variable is suspected to be a misclassified
numeric variable if it has the following two properties: First,
it should consist exclusively of numbers (possibly including signs
and decimals points). Secondly, it must have at least
nVals unique values.
The default values of
nVals is 12, which means that
e.g. variables including answers on a scale from 0-10 will
not be recognized as misclassified numerics.
checkResult with three entires:
$problem (a logical indicating the variable is suspected to be
a misclassified numeric variable),
$message (if a problem was found,
the following message: "Note: The variable consists exclusively of numbers and takes
a lot of different values. Is it perhaps a misclassified numeric variable?",
otherwise "") and
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.