If you learned R in its early days (say, the early 2000's or even the late 1990's) you may still be using some — ahem — old-fashioned ways to accomplish some tasks better served by newer functions and packages. To help those of us who have may missed some of R's more recent innovations, Karl Broman created hipsteR, a guide for "re-educating people who learned R before it was cool". Some of the suggestions Karl offers:
- The ROpenSci project provides a number of packages to download data from public repositories.
- Use packages like dplyr, reshape2, lubridate and stringr for data manipulation.
- Use knitr instead of Sweave for literate programming.
- Consider using RStudio or Emacs+ESS as a programmers' interface to R.
- Don't forget that in addition to packages on CRAN, there are many packages on GitHub that you can easily install with help from the devtools package.
- You can use underscores in variable names, and = is a valid assignment operator.
Karl has many other suggestions of new functions and packages you should be using at the link below. Got any other recommendations of new and better ways of accomplishing tasks in R? Let us know if the comments.