swap_names_vals: swap names and values of a vector

Description Usage Arguments Value

View source: R/util.R

Description

Swap names and values of a vector. Non-character values are implicitly converted to names.

Usage

1

Arguments

x

named vector

Value

vector, with values being the names of the input vector, and names being the previous values.


icd documentation built on Aug. 19, 2018, 1:05 a.m.