There are lots of tricks you can use to make R code run faster: use more efficient data structures; vectorize your R code; offload complex data management tasks to databases. Emily Robinson shares many of these R performance tips in a case study on A/B testing for Etsy. The tips are just as valuable as the process Emily shares for evaluating them — and also the process of asking the R community for help. Check out her post, linked below.
Hooked on Data: Making R Code Faster : A Case Study