R/total_perc_missing.R

Defines functions total_perc_missing

total_perc_missing <- function(dtf) {
    ## First remove sex column:
    dtf <- dtf[, -1, drop = FALSE]
    ## Then compute % of missing values:
    perc <- 100 * sum(is.na(dtf)) / (nrow(dtf) * ncol(dtf))
    ## And return a rounded value:
    return(round(perc, 1))
}
frederic-santos/rdss documentation built on March 25, 2023, 5:25 p.m.