R/invalid.R

Defines functions invalid

Documented in invalid

invalid <- function(x) {
    if (missing(x) || is.null(x) || length(x) == 0) 
        return(TRUE)
    if (is.list(x)) 
        return(all(sapply(x, invalid)))
    else if (is.vector(x)) 
        return(all(is.na(x)))
    else return(FALSE)
}
 

Try the gage package in your browser

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

gage documentation built on Dec. 13, 2020, 2:01 a.m.