R/replace_null.R
replace_null.Rd
Replace all the empty values in a list
replace_null(x, replacement = NA)
list to use
Replacement value for missing values
list(a = NULL, b = 1, c = list(foo = NULL, bar = NULL)) %>% replace_null() #> $a #> [1] NA #> #> $b #> [1] 1 #> #> $c #> $c$foo #> [1] NA #> #> $c$bar #> [1] NA #> #>