R/removeEmpty.R

Defines functions removeEmpty

Documented in removeEmpty

#' Remove Empty Elements from Vector
#' 
#' @param x vector
#' @return \code{x} with elements for which \code{\link{isNaOrEmpty}} is
#'   \code{TRUE} removed
#' @export
#' @examples 
#' removeEmpty(c(1, NA, 3))
#' removeEmpty(c("a", "", "b", NA, "c", " ", "d"))
removeEmpty <- function(x)
{
  x[! kwb.utils::isNaOrEmpty(x)]
}
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.