Replace GLU numerical codes with names, and vice versa

replace_GLU(d, map, GLU_pattern = "^GLU[0-9]{3}$")

Arguments

d

A tibble with a column named "GLU"

map

A tibble with columns GLU_code and GLU_name

GLU_pattern

Regular expression string to identify the GLU codes

Value

A tibble with codes substituted for pattern, or vice versa, depending on the original contents of the GLU column.