Efficient use of purrr for multiple pairwise calculations in dataframe

A post was split to a new topic: memory issues with mutate-map workflow?