swap the names and values of a vector
swap_vecname(x)
x
vector without duplicated values
swapped vector
v <- c("a" = "A", "b" = "B", "c" = "C") swap_vecname(v)