View source: R/pop_gen_index.R
pop_gen_index | R Documentation |
The function computes population-level genetic indices from an
object of class genind
.
pop_gen_index(x, pop_names = NULL, indices = c("Nb_ind", "A", "He", "Ho"))
x |
An object of class |
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:
By default, |
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'.
P. Savary
data(data_ex_genind) x <- data_ex_genind pop_names <- levels(x@pop) df_pop_indices <- pop_gen_index(x = x, pop_names = pop_names, indices = c("Nb_ind", "A"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.