Description Usage Arguments Value
View source: R/utils.R View source: R/remap.R
Use a user-provided look-up table, df_mapping, to map a vector. Handle NAs and collapse duplicates.
1 2 3 4 5 6 7 8 9 |
dataIn |
data.frame or data.table with a column or rownames containing genes to remap, |
colRemap |
if dataIn is a dataframe, the name of the column to remap; in this case NULL implies rownames |
df_mapping |
data.frame or coercible with columns corresponding to 'from' and 'to' arguments (using grep partial matching) |
from |
df_mapping colname to map from |
to |
df_mapping colname to map to |
replace |
boolean; if dataIn is a data.frame, TRUE replaces original, FALSE adds a new column to the data.frame |
na.rm |
boolean; remove rows that fail to map or leave them as NAs?; defaults to TRUE |
an object of the same format as dataIn with new gene names
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.