View source: R/gt_as_hierfstat.R
| gt_as_hierfstat | R Documentation |
gen_tibble to a data.frame compatible with hierfstatThis function converts a gen_tibble to a data.frame formatted
to be used by hierfstat functions.
gt_as_hierfstat(x)
x |
a |
a data.frame with a column 'pop' and further column representing the genotypes (with alleles recoded as 1 and 2)
example_gt <- load_example_gt("gen_tbl")
# Convert to hierfstat format
gt_hierfstat <- example_gt %>% gt_as_hierfstat()
# Check object class
class(gt_hierfstat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.