This function computes population specific FIS (as computed by hierfstat::fis.dosage()).

pop_fis(.x, include_global = FALSE, allele_sharing_mat = NULL)

Arguments

.x

a grouped gen_tibble (as obtained by using dplyr::group_by())

include_global

boolean determining whether, besides the population specific fis, a global fis should be appended. Note that this will return a vector of n populations plus 1 (the global value)

allele_sharing_mat

optional, the matrix of Allele Sharing returned by pairwise_allele_sharing() with as_matrix=TRUE. As a number of statistics can be derived from the Allele Sharing matrix, it it sometimes more efficient to pre-compute this matrix.

Value

a vector of population specific fis (plus the global value if include_global=TRUE)