R/gl.Ho.r

Defines functions gl.Ho

Documented in gl.Ho

#' Estimates observed Heterozygosity
#'
#' @param gl A genlight object [required]
#' @return A simple vector whit Ho for each loci
#' @export
#' @author Bernd Gruber (bugs? Post to \url{https://groups.google.com/d/forum/dartr})

gl.Ho <- function(gl) {
  out <- colMeans(as.matrix(gl) == 1, na.rm = T)
  return(out)
}

Try the dartR package in your browser

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

dartR documentation built on June 8, 2023, 6:48 a.m.