namedList: Create named list, possibly initialized with a certain...

View source: R/namedList.R

namedListR Documentation

Create named list, possibly initialized with a certain element.

Description

Even an empty list will always be named.

Usage

namedList(names, init)

Arguments

names

[character]
Names of elements.

init

[valid R expression]
If given all list elements are initialized to this, otherwise NULL is used.

Value

[list].

Examples

namedList(c("a", "b"))
namedList(c("a", "b"), init = 1)

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.

Related to namedList in BBmisc...