RStudio is hosting Hadley Wickham's two day, R Master Development course in Washington DC this December:
Dec. 10, 2012 - Advanced R programming
Dec. 11, 2012 - R package development
Course Instructor: Hadley Wickham - RStudio Chief Scientist
This is a two-day workshop, but each day can also be taking independently. To save on registration fees, sign up for both now. All participants will receive a copy of all slides, exercises, data sets, and R scripts used in the course.
Discount pricing available for academics (33% off) and students (66% off). Space is limited, please contact us to confirm your eligibility.
What should I bring?
Day 1 - Advanced R programming
Monday, Dec. 10, 2012
Do more with less code, by mastering advanced features of the R programming language.
Who should take this course?
This class will be a good fit for you if you have some experience programming in R already. You should have written a number of functions, and be comfortable with R’s basic data structures (vectors, matrices, arrays, lists, and data frames). You will find the course particularly useful if you’re an experienced R user looking to take the next step, or if you’re moving to R from other programming languages and you want to quickly get up to speed with R’s unique features.
Learn to write better R code by using the advanced features of the R programming language. Based on the programming experience of Hadley Wickham (author of over 30 R packages) and the RStudio team, this course will teach you how to use R to solve harder problems with fewer lines of code.
- Become a skilled R programmer who knows the best ways to craft R functions and to use R’s object oriented programming (OOP) features
- Learn advanced R techniques to compute on the language, control object evaluation within R functions, and apply R’s scoping rules
- Write correct, fast, and maintainable R code built around the mantra, “Don’t repeat yourself!”
What will you learn?
How to write R programs like an expert. Through a series of demonstrations and hands on exercises, you will learn about advanced R features to write fast and maintainable code.
Controlling evaluations - Unlike most languages, R provides powerful tools for controlling when and where evaluation occurs. This lets you create functions tailored for interactive use that minimize typing with a little magic.
- Mastering base functions such as
- Capture user input without evaluating it
- Control when and where R evaluates expressions and calls
- R’s rules for dynamic and lexical scoping
- Writing code that modifies code
First class functions - At heart, R is a functional programming language, and functions can be used in many more ways than most R users assume. R has first class functions which means you can write functions that return functions, take functions as input, and save function in lists. This gives you a powerful set of tools for dealing with a broad class of problems.
- Create anonymous functions
- Write closures – functions that return functions
- Build higher-order functions – functions that take other functions as input
- Work with lists of functions
Object oriented programming - Though a functional language, R contains three systems of object oriented programming (OOP) features. These features revolve around the concepts of classes and methods and can dramatically simplify code. We’ll focus on S3, the oldest and simplest form of OOP, but will also touch on S4 and R5 (reference classes).
- How to interpret base R functions that use OOP techniques
- The details of S3 generic functions, methods, and classes
- The differences between R’s three OOP classes: S3, S4, and R5
Best practices in R - Even advanced techniques can be ruined by poor planning. When you use advanced techniques, you must be especially careful to make your code clear and lucid. Throughout this course you’ll learn practical coding tips and techniques.
- Create correct, maintainable, and fast R code
- Create understandable code that communicates
- Organize R programs around the “DRY” principle – “Don’t repeat yourself!”
Day 2 - Package development
Tuesday, Dec. 11, 2012
Learn how to turn your R code into packages that others can easily download and use.
Who should take this course?
This class will be a good fit for you if you’ve developed some code that you now want to distribute to others. We’ll get you up to speed with everything you need to know about packages.
In this course you’ll learn an efficient package development workflow developed by Hadley Wickham, the author of over 30 R packages including
- Transform existing R code into packages that others can easily download and use
- Learn a fluid package development process facilitated by the
- Write inline documentation with
- Develop automated tests with the
testthatpackage to ensure that your code is correct today, and continues to be correct in the future
- Recognize common errors that prevent you from passing
R CMD check
- Release your package into the wild, through the official CRAN repository for worldwide distribution, or to local repositories for controlled distribution
What will you learn?
How to develop an idea into a published, stable R package. Through a series of demonstrations and hands on exercises, you will learn to use advanced R features to quickly build, document, test, and publish R packages.
Introduction to R packages - Packages are one of the most useful tools in the R programming language. You can use packages to quickly solve problems not easily handled by base R. You can also share your own code with friends, coworkers, or even the global R community by building it into a package.
- How to structure an R package
- Working with libraries and installing packages
- The package development cycle
Documentation and namespaces - Two things must happen before your code can become useful. First, other programmers must be able to understand your code. Second, R must be able to integrate your new functions with pre-existing ones. We will show you how to take care of these by documenting your package and creating a package namespace for your functions.
- Documenting your packages and functions
- Formatting text in help pages
- Exporting functions to a package namespace
- Use functions from other packages in your own package
Code testing - Maintaining an R package requires advanced planning. You can simplify debugging, quickly spot unintended consequences, and generally ensure that your package is stable by creating thoughtful unit tests.
- Make code maintenance easier with unit tests
- Quickly create unit tests for your package with testthat
- Seamlessly integrate unit testing into your workflow with devtools
Releasing your package - The R Core Development team helps developers share their packages with the world by hosting packages along with R on the CRAN repository. You’ll learn how to ensure your package meets R Core’s high quality standards for packages and how to best market your package after it has been included.
- Using and passing R CMD check
- Submitting a package to CRAN
- Marketing your package after its release
- Simplifying package development with source code control
In certain cases, we may need to cancel this workshop due to circumstances beyond our control or otherwise. If this happens, RStudio will refund all registration fees for those who signed up. RStudio is not responsible for any related expenses incurred by registered attendees (including but not limited to travel and hotel expenses).
Until Nov 25, 2012 - Full refund, less 10% of registration fees
Nov 26, 2012 to Dec 02, 2012 - 50% refund of registration fees
Dec 03, 2012 and after - No refund available
All public workshops hosted by RStudio come with a no-questions-asked money-back guarantee.
When & Where
RStudio is a company dedicated to providing software, education, and services for the R statistical computing environment. We started RStudio because we were excited and inspired by R. To learn more about us, visit our website at www.rstudio.com.