Learn R Programming

rlist (version 0.2.2)

list.clean: Clean a list by a function

Description

Clean a list by a function

Usage

list.clean(.data, fun = function(x) is.null(x) || length(x) == 0L)

Arguments

.data
list
fun
A logical function for clean

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