Learn R Programming

RClone (version 1.0)

pgen: Probability of a Genotype

Description

pgen and pgen_Fis compute the probability of a genotype under the Hardy-Weinberg equilibrium assumption (with or without taking account of departures from H-W equilibrium).

Usage

pgen(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE)
pgen_Fis(data1, vecpop = NULL, genet = FALSE, RR = FALSE)

Arguments

data1
a Rclone table with one allele per column.
haploid
logical, option, haploid indicates the ploidy level of data1. Not edible for pgen_Fis.
vecpop
vector, option, vecpop indicates the population name of each unit of data1, if data1 contains several populations. If data1 contains only one population, leave vecpop =
genet
option, if genet = TRUE, computes pgen on genet level.
RR
option, if RR = TRUE, computes pgen with Round-Robin method.

Value

  • a table (one population) or a list of tables (several populations) with pgen computed for each genotype.

References

Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.

See Also

freq_RR, psex and psex_Fis

Examples

Run this code
data(posidonia)

pgen(posidonia, RR = TRUE)
pgen_Fis(posidonia, RR = TRUE)

Run the code above in your browser using DataLab