Skip to contents

Switch the names and the values of a vector

Usage

names_values_switch(x)

Arguments

x

named object

Value

obj

Examples

names_values_switch(c(a = 1, b = 2))
#>   1   2 
#> "a" "b"