A checkFunction that checks if v
is a key, that is, if every observation has a unique value in v and
v is not a numeric/integer nor a Date variable. This
function is intended for use as a precheck in makeDataReport.
Usage
isKey(v)
Value
A checkResult with three entires:
$problem (a logical indicating whether v is a key),
$message (if a problem was found, the following message:
"The variable is a key (distinct values for each observation).",
otherwise "") and $problemValues (always NULL).
Arguments
v
A variable (vector) to check. All variable types are allowed.
Details
Note that numeric or integer variables are not considered candidates
for keys, as truly continuous measurements will most likely result in unique
values for each observation.