from_to: remap values

View source: R/utilities.R

from_toR Documentation

remap values

Description

pass a named vector to replace values in a second vector

Usage

from_to(vec, old_new_map_vec)

Arguments

vec

Vector of genomic region strings

old_new_map_vec

named vector with names and values corresponding to old + new pairs of values

...

Additional arguments passed to

Examples

#map values from old to new
from_to(vec = c('T_cell', 'B_cells_2', 'B_cell_1'),  
old_new_map_vec = c('B_cells_1' = 'B cell','B_cells_2' = 'B cell'))

mathosi/jj documentation built on Feb. 25, 2024, 2:29 p.m.