Skip to contents

Replace all the empty values in a list

Usage

replace_null(x)

Arguments

x

A list

Examples

list(a = NULL, b = 1, c = list(foo = NULL, bar = NULL)) %>% replace_null()
#> $a
#> [1] NA
#> 
#> $b
#> [1] 1
#> 
#> $c
#> $c$foo
#> NULL
#> 
#> $c$bar
#> NULL
#> 
#>