View source: R/collapseGenes.R
collapseGenes | R Documentation |
Collapse a vector of gene names
collapseGenes(
x,
sort = TRUE,
dedup = TRUE,
format = "_",
sep = ", ",
last = " and ",
numeric = TRUE,
width = Inf,
...
)
x |
character vector representing gene names |
sort |
logical(1) Should the names be sorted alphabetically |
dedup |
logical(1) Should duplicate names be removed |
format |
character string for markdown formatting of each element |
sep |
separator between vector elements |
last |
character string to place before the last element |
numeric |
logical(1) sort digits numerically, instead of as strings |
width |
The maximum width of the string before truncating to ... |
... |
passed to str_sort |
Convenience function to collapse a vector of gene names into a character/glue object of length 1. By default, symbols are deduplicated, sorted alpha-numerically and italicised with an underscore.
a glue object
genes <- c("FOXP3", "BRCA1", "TP53")
collapseGenes(genes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.