R/utils.R
nlist.Rd
Convenience function for making a named list from a vector or list of names and a vector or list of values
nlist(names, values)
a vector or list of the names
a vector or list of the values
a named list
n <- LETTERS[1:3] val <- c("cat", "dog", "ferret") nlist(n, val) #> $A #> [1] "cat" #> #> $B #> [1] "dog" #> #> $C #> [1] "ferret" #> nlist(list("A", "B"), 1:2) #> $A #> [1] 1 #> #> $B #> [1] 2 #>