Skip to contents

Invert a named vector

Usage

invert_named(x)

Arguments

x

A named vector

Value

A named vector with names and values inverted

Examples

invert_named(x = c(name = "element"))
#> element 
#>  "name" 

invert_named(x = c(element = "name"))
#>      name 
#> "element"