View source: R/collapse_others.R
collapse_others | R Documentation |
collapse_others()
returns a tbl_df summarising
all unique haplotype frequencies, duplicates and selected metadata into a single row.
collapse_others(data, hap_tbl, labels, cols)
data |
An object of class tbl_df containing sequence metadata. |
hap_tbl |
Output from haplotype_tbl. |
labels |
Column name which contains sequence names. |
cols |
A character vector of variables to collapse. |
collapse_others()
is a helper function to summarise metadata along with
haplotype_tbl. For any given cols
, collapse_others()
flattens its content
by unique haplotypes and its duplicates in hap_tbl
.
an object of class tbl_df.
Pedro S. Bittencourt, Rupert A. Collins.
# summarise haplotypes
hap_tbl <- haplotype_tbl(geophagus)
# summarise country
others_df <- collapse_others(geophagus_info, hap_tbl, "gbAccession", "country")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.