Mutate in dplyr / purrr using an external table / dataframe
I want to use a separate dataframe to perform a mutate on test as follows:
Vectorizing loops in R
I came across a problem on r-bloggers that I thought I’d try out as a fun project. However, I’m seeing that the loop used in the purrr::map()
function is a bottleneck in my code so I was wondering if anyone has any ideas on how I can vectorize the calculation of scores in the below code and avoid the loop?