flip: Flip the (nested) elements of a character vector (or list)...

View source: R/flip.R

flipR Documentation

Flip the (nested) elements of a character vector (or list) with its names

Description

A convenience function to switch the names and elements of a named character vector or a named list of character vectors.

Usage

flip(X)

Arguments

X

A named character vector or a named list of character vectors.

Value

A named character vector or a named list of character vectors. If the former, will be of the same length as <X>. If the latter, will be of the same length as there are unique elements across all vectors in the list.

See Also

setNames


jlaffy/scalop documentation built on March 24, 2024, 9 a.m.