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
targets | names to set. |
---|---|
values | values to assign to names (and return). |
values with names set.
#> a b #> "4" "5"#> 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')