Description Usage Arguments Value Author(s) Examples
This function reversibly converts HGNC gene symbols to valid R names by prepending "symbol.", and making the following substitutions: "-" to "hyphen", "@" to "ampersand", and "/" to "forwardslash".
1 | symbolToR(x)
|
x |
vector of HGNC symbols |
a vector of valid R names, of the same length as x, which can be converted to the same HGNC symbols using the rToSymbol function.
Levi Waldron and Markus Riester
1 2 3 4 5 6 7 | library(HGNChelper)
data("hgnc.table", envir=environment())
hgnc.symbols <- as.character(na.omit(unique(hgnc.table[ ,2])))
if( !identical(all.equal(hgnc.symbols, rToSymbol(make.names(symbolToR(hgnc.symbols)))), TRUE))
stop("HGNC mapping was not reversible.")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.