R/percentNA.r

Defines functions percentNA

Documented in percentNA

percentNA <-
function (var) 
{
    if (any(is.na(var))) {
        na = which(is.na(var))
        pc <- round((length(na)/length(var)) * 100, 2)
        return(pc)
    }
    else {
        print("No NAs found. You lucky person!", quote = FALSE)
    }
}

Try the FREddyPro package in your browser

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

FREddyPro documentation built on May 29, 2017, 7:22 p.m.