View source: R/indiv_het_obs.R
indiv_het_obs | R Documentation |
Estimate observed heterozygosity (H_obs) for each individual (i.e. the frequency of loci that are heterozygous in an individual).
indiv_het_obs(.x, as_counts = FALSE, ...)
## S3 method for class 'tbl_df'
indiv_het_obs(.x, as_counts = FALSE, ...)
## S3 method for class 'vctrs_bigSNP'
indiv_het_obs(.x, as_counts = FALSE, ...)
.x |
a vector of class |
as_counts |
logical, if |
... |
currently unused. |
either:
a vector of heterozygosities, one per individuals in the gen_tibble
a matrix with two columns, where the first is the number of heterozygous loci for each individual and the second is the number of missing values for each individual
example_gt <- load_example_gt("gen_tbl")
example_gt %>% indiv_het_obs()
# For observed heterozygosity as counts:
example_gt %>% indiv_het_obs(as_counts = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.