Whenever I deal with nested lists in R - e.g. after reading JSON documents - my code starts to resemble a jumbled mess of lapply
calls. (Or, on a better day, a horrible collection of purrr::map calls).
Luckily, there is help: the rlist R package offers lots of great functionality to extract, combine, filter, select and convert nested lists. It works with JSON arrays / files out of the box as well, so it’s super useful when you deal with the response from REST APIs, for example.
Available from a your nearest CRAN mirror.
Check it out, you won’t regret it!
This work is licensed under a Creative Commons Attribution 4.0 International License.