Convert to named list
as_named_list(x, names, sep = ".")
x | [ |
---|---|
names | [ |
sep | [ |
A named list.
x = 1:3 as_named_list(x, names = "x", sep = "-")#> $`x-1` #> [1] 1 #> #> $`x-2` #> [1] 2 #> #> $`x-3` #> [1] 3 #>as_named_list(x, names = "x")#> $x.1 #> [1] 1 #> #> $x.2 #> [1] 2 #> #> $x.3 #> [1] 3 #>#> $e1 #> [1] 1 #> #> $e2 #> [1] 2 #> #> $e3 #> [1] 3 #>