Decodes an object using the default method. Typically x
is a character vector containing codes that can be extracted from encoding
. Corresponding decodes are returned as a factor with levels of unique decodes. If encoding
is NULL, it is replaced with an encoding such that levels and labels are both unique(x)
. Duplicate codes are ignored. Duplicate decodes are collapsed (combined to a single level).
# S3 method for default
decode(x, encoding = NULL, ...)
object
length one character that is itself encoded
passed arguments
factor
Other decode: as_factor
,
decode.data.frame
, decode