purrr::pluck() accepts accessor functions
purrr::pluck() is better than I had realized. ?purrr::pluck():
[
pluck()] also accepts arbitrary accessor functions, i.e. functions that take an object and return some internal piece. […] Compare:accessor(x[[1]])$footopluck(x, 1, accessor, "foo").
Leave a comment