R Development Master Class - NYC
Monday, December 12, 2011 at 9:00 AM - Tuesday, December 13, 2011 at 5:00 PM (EST)
New York, NY
The R development master class will help you write better code, focussed on the mantra of "do not repeat yourself". In day one you will learn powerful new tools of abstraction, allowing to solve a wider range of problems with fewer lines of code. Day two will teach you how to make packages, the fundamental unit of code distribution in R, allowing others to save time by allowing them to use your code.
Day 1: Advanced programming techniques - Dec 12th (9am-5pm)
Becoming a skilled R programmer requires you to master new techniques of abstraction, particularly techniques that come from R's functional heritage. Mastering these techniques will allow you to solve harder problems with fewer lines of code.
First class functions.
Topics: Anonymous functions. Functions that write functions (closures). Functions that take functions as arguments (higher-order function). Storing functions in data structures.
R has first order functions: In this session, you'll learn how to use these abilities to write effective code.
Topics: Quoting. Evaluating. Scoping. Lazy evaluation. Computing on the language
One of the neat things about R is how it gives you much more control over evaluation than other programming languages. In this session, you'll learn how functions like `subset` and `transform` work. You'll also learn common pitfalls of these techniques and how to avoid them in your own code. I'll conclude with a brief exploration of R functions that let you modify R code.
Object oriented programming in R.
Topics: S3. S4. Reference classes.
OO is a useful technique for organising large amounts of code in a way that makes it easier to understand. In this session, you will learn about the three object oriented systems in base R. I will focus mainly on S3 and S4, as they are the most different to OO-systems you are probably familiar, and are so important for understanding existing R code. I'll touch on the new reference classes, which provide a framework much more like Java or C#.
Development best practices
Topics: Correct code. Maintainable code. Fast code.
Day one will conclude with a survey of development best-practices including a discussion of code style, commenting, profiling, improving performance and testing. We'll touch on the new byte-code compiler in R, and on writing high-performance code in C++ with the Rcpp package.
Day 2: Package development - Dec 13th (9am-5pm)
Packages are the fundamental unit of distributable R code. They include reusable R functions, the documentation that describes how to use them, sample data and much much more. On day two you'll learn how to turn your code into packages that others can easily download and use. Writing a package can seem overwhelming at first, but we'll start with the basics, and show you the packages that will help you get up and running as quickly as possible. You'll learn from the mistakes I've made writing over 20 R packages, and learn the tools that make package development and maintenance as simple as possible.
Introduction to package development
Topics: Overview of package structure. The devtools package. Reading the source.
A great way to improve your R and package development skills is to inspect the packages that others have developed. We'll focus on the stringr, lubridate, and plyr packages to show off various aspects of package development and programming in the large
Playing well with others
Topics: Documentation. Namespaces. The roxygen package.
Your package is not an island alone, it must be able to integrate into the existing R ecosystem. In this session we'll cover documentation (at both the package and function levels), so that new users can get up and running with your package quickly, and namespaces, which help make sure your package doesn't interfere with other packages the user might have loaded.
Ensuring correctness with unit testing.
Topics: Testing philosophy. Unit testing. The testthat package.
To trust that you package is working correctly
Releasing your package into the wild.
Topics: `R CMD check`. Releasing on CRAN and the release cycle. Source code control. Community management.
Once you have your package working, you need to make sure it passes all automated testing and release it to CRAN. In this session, you'll learn how to effectively deal with the frustration of `R CMD check` and other important steps in the release process. We'll conclude with some pointers on developing a vibrant community around your package.
We have limited student (66% off) and academic (33% off) discounts available. Please contact Hadley directly for details and to verify your status.
We have the right to cancel the event for any reason at any time. Revolution Analytics will refund all monies paid for ticket sales in full in the event of a cancellation. We are not responsible for any travel related expenses incurred by attendees for this event. This includes but not limited to transportation, hotel accommodations or any other travel related expenses secured by the attendee, due to a cancellation on our part.
Date of purchase to Nov 28, 2012 - Full refund less 10% of the paid ticket price
Nov 29 to Dec 4, 2012 - 50% of paid ticket price
On or after Dec 5, 2012 - Non refundable
When & Where
Sponsored by Revolution Analytics, Inc.