Skip to contents

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"))
#> [1] 2