R/eliminateNA.r

Defines functions eliminateNA

Documented in eliminateNA

eliminateNA <- function(dat){
    n <- dim(dat)[1]
    c <- dim(dat)[2]
    tmp <- matrix(NA, ncol = c, nrow = n)
    for (i in 1:c){tmp[, i] <- as.numeric(dat[, i])}

    compl <- dat[complete.cases(dat) == TRUE, ]
    incompl <- dat[complete.cases(dat) == FALSE, ]
    res <- list(complete = compl, incomplete = incompl)
    return(res)
}

Try the reporttools package in your browser

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

reporttools documentation built on Oct. 12, 2021, 5:06 p.m.