R/measure_missing.R

Defines functions measure.missing

Documented in measure.missing

#' Measure the missingness of a SNP or entry
#'
#'
measure.missing <- function(x, type = "numeric") {

  if (type == "numeric") {
    return( sum(is.na(x)) / length(x) )
  }

  if (type == "nucleotide") {
    return( sum(x == "NN") / length(x) )
  }
}
neyhartj/gws documentation built on Nov. 9, 2017, 8:35 p.m.