compact {arcgisutils} | R Documentation |
General utility functions
Description
General utility functions
Usage
compact(.x)
a %||% b
check_dots_named(dots, call = rlang::caller_env())
Arguments
.x |
a list |
a |
an R object |
b |
an R object |
dots |
a list collected from dots via |
call |
default |
Details
-
compact()
removes anyNULL
list elements -
%||%
is a special pipe operator that returnsb
ifa
isNULL
Value
-
compact()
a list -
%||%
the first non-null item orNULL
if both areNULL
Examples
# remove null elements
compact(list(a = NULL, b = 1))
# if NULL return rhs
NULL %||% 123
# if not NULL return lhs
123 %||% NULL
[Package arcgisutils version 0.3.0 Index]