if (FALSE) { # all(rlang::is_installed(c("RhpcBLASctl", "data.table")))
# \dontshow{
data.table::setDTthreads(2)
RhpcBLASctl::blas_set_num_threads(2)
RhpcBLASctl::omp_set_num_threads(2)
# }
example_gt <- load_example_gt("grouped_gen_tbl")
# Compute expected heterozygosity
example_gt %>% pop_het_obs()
# To include the global expected heterozygosity, set include_global = TRUE
example_gt %>% pop_het_obs(include_global = TRUE)
# To return by locus, set by_locus = TRUE
example_gt %>% pop_het_obs(by_locus = TRUE)
}
Run the code above in your browser using DataLab