Learn R Programming

isqg (version 1.2)

founder: Constructor of a Founder Instances of the Specimen Class

Description

Constructor of instances of the Specimen class given the Specie from which the individual will belong where all loci will equal to the provided genotype.

Usage

founder(specie, code)

Arguments

specie

an instance of the R6 class Specie with the genome's parameters.

code

a length one character vector with one of the genotype codes: "AA", "Aa", "aA" or "aa".

Value

Objects of R6 class with methods to mimic in silico Specimens.

Details

Genotypes can be coded as AA, Aa, aA or aa, that meant to represent both homozigous (AA and aa) as well as both heterozigous (Aa and aA).

Examples

Run this code
# NOT RUN {
data(ToyMap)
spc <- set_specie(ToyMap)

## through standalone function
AA <- founder(spc, "AA")
aa <- founder(spc, "aa")

## or by the Specie's method
Aa <- spc$founder("Aa")
aA <- spc$founder("aA")

# }

Run the code above in your browser using DataLab