Learn R Programming

envnames (version 0.4.1)

unlist_with_names: Call unlist and preserve the names

Description

Function unlist is called so that the output is an array (whenever possible) whose names attribute contains the names of the elements of the list (unchanged, i.e. without adding a number to identify them as the regular unlist() function does).

Usage

unlist_with_names(alist)

Arguments

alist

list to unlist.

Value

Whenever possible, an array whose names attribute is set to the names of the elements of the list.