invert_list: Invert list

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Inverts a (named) list such that the values become the keys and the keys become the values.

Usage

1

Arguments

x

A named list

Value

A list with values as keys and keys as values.

Author(s)

Mikhail Popov

Examples

1
invert_list(list(x = c(1, 2), y = c(2, 3)))

wikimedia/wikimedia-discovery-wmf documentation built on Feb. 7, 2021, 12:19 a.m.