Learn R Programming

campfin (version 1.0.11)

invert_named: Invert a named vector

Description

Invert the names and elements of a vector, useful when using named vectors as the abbreviation arguments both of expand_abbrev() and abbrev_full() (or their parent normalization functions like normal_address())

Usage

invert_named(x)

Value

A named vector with names in place of elements and vice versa.

Arguments

x

A named vector.

Examples

Run this code
invert_named(x = c("name" = "element"))

Run the code above in your browser using DataLab