Learn R Programming

rlist (version 0.3-2)

list.clean: Clean a list by a function

Description

Clean a list by a function

Usage

list.clean(.data, fun = is.null, recursive = FALSE)

Arguments

.data
list
fun
A logical function for clean
recursive
logical. Should the list be cleaned recursively?

Examples

Run this code
x <- list(a=NULL,b=NULL,c=NULL,d=1,e=2)
list.clean(x)

Run the code above in your browser using DataLab