
Last chance! 50% off unlimited learning
Sale ends in
A checkFunction
that checks if v
has
one of the classes supported by dataMaid, namely character
,
factor
, numeric
, integer
, labelled
,
logical
and Date
(inlcuding other classes that inherits
from any of these classes). A user supported list can be provided
in the treatXasY
argument, which will let the user decide
how unsupported classes should be treated. This
function is intended for use as a precheck in makeDataReport
.
isSupported(v)
A variable (vector) to check. All variable types are allowed.
A checkResult
with three entires:
$problem
(a logical indicating whether v
contains only one value),
$message
(if a problem was found, a message describing which single
value the variable takes and how many missing observations it contains, otherwise
""), and $problemValues
(always NULL
).
# NOT RUN {
integerVar <- 1:10 #supported
rawVar <- as.raw(1:10) #not supported
isSupported(integerVar)
isSupported(rawVar)
# }
Run the code above in your browser using DataLab