# S3 method for naaccr_record
unknown_to_na(x, ...)
# S3 method for factor
unknown_to_na(x, field, ...)
Value
If x was a factor, then the result is a vector with the
values of x, except all levels which effectively mean "unknown" are
replaced with NA.
The returned factor won't have those in its levels, either.
If x is a naaccr_record object, then the result is the
naaccr_record created by applying this function to all columns of
x.
Arguments
x
Either a factor created with naaccr_factor, or a
naaccr_record object.
...
Further arguments passed to or from other methods.
field
String giving the XML name of the NAACCR field to code.