drop_empty.list: Drop list elements with empty value

View source: R/drop.R

drop_empty.listR Documentation

Drop list elements with empty value

Description

Drop list elements with empty value

Usage

## S3 method for class 'list'
drop_empty(x)

Arguments

x

(list) (Nested) list object for which to drop desired values

Value

(list) Cleaned list

Examples

x <- list(
    foo = list(bar = integer(), baz = list(x = 1, y = character(), z = 3)),
    bar = 2,
    baz = logical()
)
drop_empty(x)

rappster/drop documentation built on May 16, 2022, 12:25 a.m.