You can use modify_depththis if you know at what level you want to extract information.
You want to output tfor nested lists, which is level 2.
modify_depth(list, 2, "t")
$node
$node$a
[1] 1
$node$b
[1] 2
$node
$node$a
[1] 3
$node$b
[1] 4
The purrr family of functions modifyreturns an object of the same type as the input, so you need to unlistget a vector instead of a list.
source
share