Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getal.b

Converts diploid genotypic data into allelic data


Description

Converts a data frame of genotypic diploid data with as many lines as individuals (ni) and as many columns as loci (nl) into an array [ni,nl,2] of allelic data

Usage

getal.b(data)

Arguments

data

a data frame with ni rows and nl columns. Each line encodes one individual, each column contains the genotype at one locus of the individual

Value

an array [ni,nl,2] of alleles. The two alleles are stored in the third dimension of the array

Author(s)

Jerome Goudet jerome.goudet@unil.ch

Examples

data(gtrunchier)
#multilocus diploid genotype of the first individual
gtrunchier[1,-c(1:2)]
#the diploid genotype splitted in its two constituent alleles
getal.b(gtrunchier[,-c(1:2)])[1,,]

hierfstat

Estimation and Tests of Hierarchical F-Statistics

v0.5-10
GPL (>= 2)
Authors
Jerome Goudet [aut, cre], Thibaut Jombart [aut], Zhian N. Kamvar [ctb], Eric Archer [ctb], Olivier Hardy [ctb]
Initial release
2021-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.