View source: R/simulate_phenotypes.R
make_geno | R Documentation |
Under Hardy Weinberg a genotype is binomially distributed, with p = allele frequency
make_geno(n, p)
n |
Sample size |
p |
Array of allele frequencies to simulate. Can be a single value. |
Array or matrix of genotypes
## Not run:
g <- make_geno(100, 0.5) # To make a single genotype
g <- make_geno(100, c(0.5, 0.3, 0.6)) # To make 3 genotypes in a matrix
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.