Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

isqg (version 1.4)

genotype: Codify Specimens' Genotypes.

Description

Codify Specimens' genotypes instances as numeric codes [-1/0/1] or as character vector that keeps the phase information.

Usage

genotype(pop, phase = FALSE)

Value

A numeric or character matrix with the codified Specimens' genotypes.

Arguments

pop

a list with instances of the R6 class Specimen.

phase

logical should the codes keep the phase.

Examples

Run this code
data(ToyMap)
spc <- set_specie(ToyMap)

Aa <- founder(spc, "Aa")
aA <- spc$founder("aA")

Both <- list(Aa = Aa, aA = aA)

## different ways
genotype(Both)               # as numeric
genotype(Both, phase = TRUE) # as character

Run the code above in your browser using DataLab