map_var: Mapper to add extra details

Description Usage Arguments Value Examples

Description

Mapper to add extra details

Usage

1
map_var(x, from, to)

Arguments

x

vector to be changed

from

regular expression to change

to

word to change to

Value

updated vector

Examples

1
2
3
4
5
6
7
8
9
map_biomarker  <- readxl::read_excel("data-raw/2018_12_12-mappers.xlsx", sheet = 1)
biomarkers  <- readxl::read_excel("data-raw/2018_12_10-biomarkers.xlsx")
biomarkers %>%
  mutate(
    System = map_var(
      BIOMARKER,
      from = map_biomarker$from,
      to = map_biomarker$System
    ))

jonotuke/painBiomarkR documentation built on May 13, 2019, 3:01 a.m.