R/filterNull.R

Defines functions filterNull

Documented in filterNull

#' Filter a list for NULL values
#'
#' @param li [\code{list}]\cr
#'  List.
#' @return [\code{list}].
#' @export
filterNull = function(li) {
  assertList(li)
  li[!vlapply(li, is.null)]
}

Try the BBmisc package in your browser

Any scripts or data that you put into this service are public.

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.