pop_gen_index: Compute population-level genetic indices
Description
The function computes population-level genetic indices from an
object of class genind.
Usage
pop_gen_index(x, pop_names = NULL, indices = c("Nb_ind", "A", "He", "Ho"))
Value
An object of class data.frame whose rows
correspond to populations and columns to population attributes
(ID, size, genetic indices). By default, the first column corresponds to
the population names (ID). The order of the columns depends on the
vector 'indices'.
Arguments
x
An object of class genind
from package adegenet.
pop_names
(optional) A character vector indicating population names.
It is of the same length as the number of populations. Without this
argument, populations are given the names they have initially in the
'genind' object (which is sometimes only a number). The order of the
population names must match with their order in the 'genind' object.
The function does not reorder them. Users must be careful.
indices
(optional) A character vector indicating the population-level
indices to compute. These indices can be:
Mean allelic richness by locus by
population (indices = c("A", ...))
Mean expected heterozygosity by locus by
population (indices = c("He",...))
Mean observed heterozygosity by locus by
population (indices = c("Ho",...))
Number of individuals by
population (indices = c("Nb_ind", ...))
Total allelic richness by
population (indices = c("A_tot",...))
By default, indices = c("Nb_ind", "A", "He", "Ho").