na_implicit: na_implicit

Description Usage Arguments Details See Also Examples

View source: R/na_implicit.R

Description

Change certain values to NAs, ie make explicit 'NAs' back to 'NA'

Usage

1
na_implicit(x, values)

Arguments

x

object

values

values to be recognized as NA

Details

'na_implicit' replaces 'values' by 'NA'. It is meant to be nearly inverse operation to 'na_explicit' (and 'na_replace'). It can be used on both atomic and recursive objects.

'na_implicit' is a S3 methods that can be used to defince additional methods.

See Also

- 'na_explicit' - 'na_replace'

Examples

1
2
3
4
5
6
7
8
 na_implicit( c(1,2,3,4), 3 )
 na_implicit( c("A", "NA", "B", "C") )
 na_implicit( c("A", "(Missing)", "B", "C") )
 
 df <- data.frame( char=c('A', 'NA', 'C', "(Missing)"), num=1:4 ) 
 na_implicit(df)
 
 

decisionpatterns/na.actions documentation built on Aug. 25, 2020, 8:04 p.m.