mapNames: mapping a vec to another name space

Description Usage Arguments Details Value

View source: R/aheatmap.R

Description

given a vector and a 2-column map, map names for vector based on the map. This is useful if we want to update labels according to a table.

Usage

1
mapNames(vec, map, fac2string = TRUE)

Arguments

vec

the input vector

map

2-column data frame where first column is input names; 2nd column for output names

fac2string

whether to treat factor as string

Details

This function returns a new label vector with instructions in the map if a hit is found in the map

Value

a vector same length as vec


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.