rm_null: Recursive 'rm' for lists

rm_nullR Documentation

Recursive rm for lists

Description

Remove NULL or list(NULL) objects recursively from a list.

Usage

rm_null(x, rm_list = TRUE)

Arguments

x

a list

rm_list

logical; if FALSE, lists with only the NULL object will not be removed

References

https://stackoverflow.com/q/26539441/2994949

Examples

l <- list(list(NULL), list(1), list('a', NULL))

l
rm_null(l)
rm_null(l, FALSE)


raredd/rawr documentation built on March 4, 2024, 1:36 a.m.