Skip to contents

Given a character vector, this function creates an empty list with names corresponding to the elements of the vector.

Usage

createNamedList(vec)

Arguments

vec

A character vector specifying names of each element in the list.

Value

A named list with the same length as vec.

Examples

createNamedList(c("x", "y"))
#> $x
#> NULL
#> 
#> $y
#> NULL
#>