jakobbossek/re

asNamedList

Closed this issue · 1 comments

Should expect a vector or list. In any case, convert the passed object into a list and assign names.

x = c(1, 10, 100)
x = asNamedList(x, names = c("a", "b", "c"))
x = asNamedList(x, names = "a") # name element a.1 to a.n where n is the length of x

Done