compact2 {salesforcer} | R Documentation |
Remove all zero-length elements from list ignoring AsIs elements
Description
This function wraps the compact
function to recursively
remove elements from lists that have zero length, but spares the elements wrapped
in I
which mean something specific when passing as JSON.
Usage
compact2(.x, .p = identity)
Arguments
.x |
|
.p |
|
Value
list
containing no empty elements, but does leave anything that
has been wrapped in I()
making the class AsIs
which signals
to toJSON
not to drop the value, but to set as null.
Note
This function is meant to be used internally. Only use when debugging.
[Package salesforcer version 1.0.1 Index]