Set names of right-argument to be left-argument, and return right argument. Called from := operator.

named_map_builder(targets, values)

`:=`(targets, values)

targets %:=% values

Arguments

targets

names to set.

values

values to assign to names (and return).

Value

values with names set.

See also

Examples

c('a' := '4', 'b' := '5')
#> a b #> "4" "5"
# equivalent to: c(a = '4', b = '5') c('a', 'b') := c('1', '2')
#> a b #> "1" "2"
# equivalent to: c(a = '1', b = '2') # the important example name <- 'a' name := '5'
#> a #> "5"
# equivalent to: c('a' = '5')