Description Usage Arguments Details See Also Examples
Change values to NA
s, ie make explicit NAs
back to NA
1 2 3 4 5 6 7 8 9 10 11 12 | na.unreplace(x, values)
## Default S3 method:
na.unreplace(x, values = NULL)
## S3 method for class 'character'
na.unreplace(x, values = c("NA", NA_explicit_))
## S3 method for class 'factor'
na.unreplace(x, values = c("NA", NA_explicit_))
na.implicit(x, values)
|
x |
object |
values |
values that are (or can be coerced to) |
na.unreplace
replaces values
by NA
. It is meant to be nearly inverse
operation to na_replace
(and na_explicit
). It can be used on both atomic
and recursive objects. Unlike na.replace
however, values
express the
values that if matched are set to NA
. It is basically:
1 |
na.unreplace
is a S3 method that can be used to defince additional
methods for other objects.
na.replace()
1 2 3 4 5 6 7 8 | na.unreplace( c(1,2,3,4), 3 )
na.unreplace( c("A", "(NA)", "B", "C") )
na.unreplace( c("A", NA_explicit_, "B", "C") )
df <- data.frame( char=c('A', 'NA', 'C', NA_explicit_), num=1:4 )
na.unreplace(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.