Unknown or missing values (NA
in R
) can be represented in various ways (as 0, 999, etc.) in different programs. isUnknown
, unknownToNA
, and NAToUnknown
can help to change unknown values to NA
and vice versa.
isUnknown(x, unknown=NA, ...)unknownToNA(x, unknown, warning=FALSE, ...)
NAToUnknown(x, unknown, force=FALSE, call.=FALSE, ...)
# S3 method for default
isUnknown(x, unknown, ...)
# S3 method for POSIXlt
isUnknown(x, unknown, ...)
# S3 method for list
isUnknown(x, unknown, ...)
# S3 method for data.frame
isUnknown(x, unknown, ...)
# S3 method for matrix
isUnknown(x, unknown, ...)
unknownToNA(x, unknown, warning = FALSE, ...)
# S3 method for default
unknownToNA(x, unknown, warning, ...)
# S3 method for factor
unknownToNA(x, unknown, warning, ...)
# S3 method for list
unknownToNA(x, unknown, warning, ...)
# S3 method for data.frame
unknownToNA(x, unknown, warning, ...)
NAToUnknown(x, unknown, force = FALSE, call. = FALSE, ...)
# S3 method for default
NAToUnknown(x, unknown, force, call., ...)
# S3 method for factor
NAToUnknown(x, unknown, force, call., ...)
# S3 method for list
NAToUnknown(x, unknown, force, call., ...)
# S3 method for data.frame
NAToUnknown(x, unknown, force, call., ...)
.unknownList(x, unknown)
generic, object with unknown value(s)
generic, value used instead of NA
arguments pased to other methods (as.character for POSIXlt in case of isUnknown)
logical, issue warning if x
already has NA
logical, force to apply already existing value in x
logical, look in warning
Gregor Gorjanc
AlphaPart