How do I sort a list alphabetically by name using purrr (or some other package in the tidyverse)?
Basically I'm looking for the equivalent of:
lst <- list(b = letters, c = 1:100, a = runif(10))
lst <- lst[order(names(lst))]
Thanks!
How do I sort a list alphabetically by name using purrr (or some other package in the tidyverse)?
Basically I'm looking for the equivalent of:
lst <- list(b = letters, c = 1:100, a = runif(10))
lst <- lst[order(names(lst))]
Thanks!