Convert named list to vector with values only
Use unlist
with use.names = FALSE
argument.
unlist(myList, use.names=FALSE)
purrr::flatten_*()
is also a good option. the flatten_*
functions add thin sanity checks and ensure type safety.
myList <- list('A'=1, 'B'=2, 'C'=3)
purrr::flatten_dbl(myList)
## [1] 1 2 3