h_map_pos: Helper Function For Matching Map Values to Names

View source: R/HermesData-methods.R

h_map_posR Documentation

Helper Function For Matching Map Values to Names

Description

This is used by the rename method. It wraps the assertions and the matching used several times.

Usage

h_map_pos(names, map)

Arguments

names

(character)
original names.

map

(named character)
the mapping vector from old (value) to new (name) names. All values must be included in names.

Value

Integer vector of the positions of the map values in the names.

Examples

h_map_pos(c("a", "b"), c(d = "b"))

insightsengineering/hermes documentation built on March 11, 2024, 11:04 p.m.