Relative Content

Tag Archive for rpurrr

R: purr and map: how to save intermediate computations?

Please consider the snippet at the end of the post.
I would like to be able to save (possibly as an RDS) the results of the computations while they progress (e.g. every time a new 10% of the list is processed). How can I do that?

purrr::pwalk throws error when mutating col while purrr::pmap does not

I’d like to understand why the first block works but the second does not. I believe it has something to do with the fact that pwalk does not actually output anything. However, the error is concated_cols must be size 150 or 1, not 2. I would have expected it to be size 1. What is it outputing?