Switch the names and the values of a vector
names_values_switch.Rd
Switch the names and the values of a vector
See also
Other vectors:
len_unique()
,
rle_df()
,
rle_groups()
,
rle_seq()
,
sort_by_names()
,
true_names()
,
unify_vec_preserve_order()
,
unique_with_names()
,
vlookup()
,
vlookup_from_ref()
,
zchar_remove()
Examples
names_values_switch(c(a = 1, b = 2))
#> 1 2
#> "a" "b"