Learn R Programming

xefun (version 0.1.5)

as.list2: vector to list

Description

Converting a vector to a list with names specified.

Usage

as.list2(x, name = TRUE, ...)

Arguments

x

a vector.

name

specify the names of list. Setting the names of list as x by default.

...

Additional parameters provided in the as.list function.

Examples

Run this code
as.list2(c('a', 'b'))

as.list2(c('a', 'b'), name = FALSE)

as.list2(c('a', 'b'), name = c('c', 'd'))

Run the code above in your browser using DataLab