Description Usage Arguments Value Examples
View source: R/plot_amm_from_matrix.R
For illustration purposes, if you want to simply plot an ancestry matrix (or several) to show particular values, then this is the handy function for you.
1 |
X |
input tibble with a factor or character column |
plot_amm_from_matrix()
returns a ggplot object: each facet is an image of the
ancestry match matrix. It is facet-wrapped over the values in the ID column of X
.
1 2 3 4 5 6 7 | # get some input: all the 2-generation AMMs in `example_amms`
X <- example_amms[stringr::str_detect(names(example_amms), "2gen$")] %>%
tibble::enframe(name = "ID", value = "anc_match_matrix")
# plot those
g <- plot_amm_from_matrix(X) +
ggplot2::facet_wrap(~ ID)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.