Making your code faster is requires balancing short-term and long-term goals. If you only spend time making your existing code faster, you'll never get any new work done, but if you don't spend any time thinking about inefficient code you'll waste time computing that you could have reduced with a little more knowledge. Below I make three broad recommendations on how to make your R code faster, based on whether you want a pay off in the short, medium or long term.
In the short term, you'll get the most bang for your buck by learning how to write better R code. Patrick Burns' The R inferno is a great place to learn about the most common performance mistakes and how to avoid them. I also like Norm Matloff's The Art of R programming, and I have my own hat in the ring with Advanced R programming. Apart from books, asking and answering questions on [stackoverflow](h