is_empty: Does an object contain anything?

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utils.R

Description

Does an object contain anything?

Usage

1
is_empty(x, recursive = TRUE)

Arguments

x

An R object, typically a list or vector.

recursive

logical, whether to unlist x to check for contents at any depth.

Value

logical, whether x contains anything.

Author(s)

Brendan Knapp brendan.g.knapp@gmail.com

See Also

base::unlist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(salinasr)

vec <- NULL
vec
is_empty(vec)

nested_list <- list(a = list(b = list(c = list(d = NULL), e = NULL), f = NULL), g = NULL)
nested_list
is_empty(nested_list)
is_empty(nested_list, recursive = FALSE)

knapply/salinasr documentation built on May 27, 2019, 2:09 p.m.