insert_values_by_name: Insert values from another vector with some shared names

View source: R/tools.R

insert_values_by_nameR Documentation

Insert values from another vector with some shared names

Description

Insert values from another vector with some shared names

Usage

insert_values_by_name(vec, values)

Arguments

vec

the vector where the values should be inserted

values

the vector with the replacements

Value

the modified vector

Examples

vec <- letters[1:3] %>% are_names_of(0)
vals <- letters[2:4] %>% are_names_of(1)
insert_values_by_name(vec, vals)

dlill/conveniencefunctions documentation built on Sept. 30, 2022, 4:40 a.m.