is_empty: Does an object contain anything?

Description Usage Arguments Value Author(s) See Also Examples

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)

brendan-g-knapp/salinasr documentation built on May 22, 2019, 3:39 p.m.