Relative Content

Tag Archive for rdplyrpurrr

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?