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)

Arguments

v

A variable (vector) to check. All variable types are allowed.

Value

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).

See also

Examples

integerVar <- 1:10 #supported rawVar <- as.raw(1:10) #not supported isSupported(integerVar)
#> No problems found.
isSupported(rawVar)
#> The variable has class raw which is not supported by dataMaid.