is_null_list: Checks if the value is and empty list()

Description Usage Arguments Value Examples

View source: R/dendlist.R

Description

Checks if the value is and empty list(). Can be useful.

Usage

1

Arguments

x

whatever object to check

Value

logical

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# I can run this only if I'd make is_null_list exported
## Not run: 
# TRUE:
is_null_list(list())
# FALSE
is_null_list(list(1))
is_null_list(1)

x <- list(1, list(), 123)
ss_list <- sapply(x, is_null_list)
x <- x[!ss_list]
x

x <- list(1, list(), 123)
ss_list <- sapply(x, is_null_list)
x <- list(list())
x

## End(Not run)

## Not run: 
# error
is_null_list() 

## End(Not run)

dendextend documentation built on May 3, 2018, 5:04 p.m.