View source: R/IndividualFunctions.R
Generate a new individual Flexible function to generate an individual based on a genome. haplotypes and sex can be random or specified.
1 | newIndividual(genome, genotype = NULL, hap1 = NULL, hap2 = NULL, sex)
|
genome |
a genome object |
genotype |
the genotype of the individual. Relevant when pure individuals are desired. either 0, 1 or 2. 0: individual will be homozygote for 0. 1: individual will be homozygote for 1. 2: individual will be heterozygote genome wide |
hap1 |
a list including a bit vector which will be the first haplotype of the individual |
hap2 |
a list including a bit vector which will be the second haplotype of the individual |
sex |
male or female. male is specified by "male", "m", "0" or 0. female is "female", "f", "1" or 1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.