Is it possible to avoid using a for-loop in the following example? I have attempted to use purrr::pmap at some point but it seemed more complicated than this soluti
purrr::pmap