R/n2z.R

#' Convert NULL to a zero
#' @param x Input object
#' @export

n2z <- function(x) {
    ## Converts nulls to zeros
    if (is.null(x)) {
        return(0)
    } else {
        return(x)
    }
}

Try the tlocoh package in your browser

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

tlocoh documentation built on May 2, 2019, 5:27 p.m.