View source: R/get_delim_cols.R
get_delim_cols | R Documentation |
get_delim_cols()
returns a tbl_df format containing
extracted and processed data from delim_autoplot.
get_delim_cols(p, delimname = NULL, hap_tbl = NULL)
p |
Output from delim_autoplot. |
delimname |
A character vector of species delimitation names (optional). If provided, the function filters the data to only include rows matching such terms. Default to NULL. |
hap_tbl |
output from haplotype_tbl (optional). If provided, the function will annotate color and fill data for collapsed haplotypes. Default to NULL. |
get_delim_cols()
is a convenience function to extract labels, species partitions,
color and fill data from the output of delim_autoplot in a tbl_df
format. It is best used when combined with haplotype information from
haplotype_tbl or when combined with other metadata, such as GPS coordinates
for map plotting.
an object of class tbl_df.
Pedro S. Bittencourt.
# plot using autoplot
p <- delim_autoplot(geophagus_delims, geophagus_beast)
# view
p
# get haplotypes
hap_tbl <- haplotype_tbl(geophagus)
# extract colors for consensus
get_delim_cols(p, delimname= "consensus", hap_tbl= hap_tbl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.