swap_vecname: swap the names and values of a vector

swap_vecnameR Documentation

swap the names and values of a vector

Description

swap the names and values of a vector

Usage

swap_vecname(x)

Arguments

x

vector without duplicated values

Value

swapped vector

Examples

v <- c("a" = "A", "b" = "B", "c" = "C")
swap_vecname(v)


baizer documentation built on Oct. 19, 2023, 9:07 a.m.