crosswalk | R Documentation |
crosswalk()
will convert values found in one of the columns of an
HGNC gene data set to values in another.
crosswalk(value, from, to = from, hgnc_dataset = import_hgnc_dataset())
value |
A character vector of values to be matched in the |
from |
The name of the column in the HGNC gene data set ( |
to |
The name of the column whose values are to be returned,
corresponding to matches in the |
hgnc_dataset |
A data frame corresponding to a HGNC gene data set.
Typically, you'd get hold of a HGNC gene data set with
|
## Not run:
# Map a gene symbol to its HUGO identifier.
crosswalk(value = "A1BG", from = "symbol", to = "hgnc_id")
# If `from` and `to` refer to the same column, `crosswalk()` will filter
# out unmatched values by converting them to `NA`.
crosswalk(value = c("A1BG", "Not a gene"), from = "symbol", to = "symbol")
# This is the default behavior, so you can simply call:
crosswalk(value = c("A1BG", "Not a gene"), from = "symbol")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.