invertList: Invert the names and elements of a list
Description
Invert the names and elements of a list
Usage
invertList(inputList, simplify = FALSE)
Value
A list with values from the input becoming names and vice versa. When simplify=TRUE and there are no duplicated names, a named character vector is returned instead.
Arguments
inputList
a list, other classed (e.g. named vectors) will be converted to lists
simplify
Logical, if yes and if no duplicated names, return a vector