Writing great R code - Cotton, Richard (O'Reilly Media, 2015)
"Modern data analysis requires that you have two jobs: being a statistician and being a programmer. This is especially true with R, where pointing and clicking to analyze data is mostly not an option. Fortunately, the jump from "writing code like a statistician" to "being a statistical programmer" isn't that far. This webcast covers a few simple skills that will get you started, including: Writing stylish code. Finding bad functions with the sig package. Writing robust code with the assertive package. Testing your code with the testthat package.Documenting your code with the roxygen2 package."--Resource description page.