Learn R Programming

baizer (version 0.8.0)

swap_vecname: swap the names and values of a vector

Description

swap the names and values of a vector

Usage

swap_vecname(x)

Value

swapped vector

Arguments

x

vector without duplicated values

Examples

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

Run the code above in your browser using DataLab