Debian Codegraph @

man/is_null_list.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/dendlist.R
3 \name{is_null_list}
4 \alias{is_null_list}
5 \title{Checks if the value is and empty list()}
6 \usage{
7 is_null_list(x)
8 }
9 \arguments{
10 \item{x}{whatever object to check}
11 }
12 \value{
13 logical
14 }
15 \description{
16 Checks if the value is and empty list(). Can be useful.
17 }
18 \examples{
19 # I can run this only if I'd make is_null_list exported
20 \dontrun{
21 # TRUE:
22 is_null_list(list())
23 # FALSE
24 is_null_list(list(1))
25 is_null_list(1)
26
27 x <- list(1, list(), 123)
28 ss_list <- sapply(x, is_null_list)
29 x <- x[!ss_list]
30 x
31
32 x <- list(1, list(), 123)
33 ss_list <- sapply(x, is_null_list)
34 x <- list(list())
35 x
36 }
37
38 \dontrun{
39 # error
40 is_null_list()
41 }
42 }