smunlist: Unlist with name preservation

Description Usage Arguments Details Value Author(s) Examples

View source: R/addons.R

Description

Collapses list to a named vector with keeping the names as they were in the lowest leaves in a list.

Usage

1

Arguments

li

list

Details

The function works for the lists of multiple levels. These levels can be named, unnamed, or mixture of both. The names of the returned vector are preserved exactly as they were in a lowest leaves of the list, which means that they can be duplicated.

Value

named character vector

Author(s)

Małgorzata Oleś <[email protected]>

Examples

1
2
mylist = list(A=setNames(1:3, nm=letters[1:3]), B=list(D=3:4, setNames("a", nm=2)))
smunlist(mylist)

MalgorzataOles/pace documentation built on Nov. 18, 2017, 7:51 a.m.