I want an easy way to convert a data.table or tibble into a named list. I'm guessing it could be down with purrr, nest and split. This is for an options list in shiny.
There are similar question, but did not find any like this.
d <- tidyr::tribble(
~key, ~value,
'a', 1,
'b', 2,
'c', 3
)
result <- list(a = 1, b = 2, c = 3)