dendextend (version 1.6.0)

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

Description

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

Usage

is_null_list(x)

Arguments

x

whatever object to check

Value

logical

Examples

Run this code
# NOT RUN {
# 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
# }
# NOT RUN {
# }
# NOT RUN {
# error
is_null_list() 
# }

Run the code above in your browser using DataCamp Workspace