R/empty.R

Defines functions `empty`

`empty` <-
function(x)
{
  if(!is.null(x))
  {
    result <- x
    result[] <- NA
  }
  else
    result <- NULL
  
  return(result)
}

Try the cmrutils package in your browser

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

cmrutils documentation built on May 1, 2019, 7:59 p.m.