R/makegamete.R

Defines functions makegamete

#' @title Make gamete
#'
#' @noRd
makegamete <- function(genotype, seed=NA) {
    gamete = genotype/2
    gamete[gamete==0.5] = sample(0:1, length(gamete[gamete==0.5]), replace=TRUE)
    return(gamete)
}

Try the pedSimulate package in your browser

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

pedSimulate documentation built on Sept. 26, 2023, 9:06 a.m.