Home

Awesome

Reproducible computation at scale in R with targets

Launch RStudio Cloud

Data science can be slow. A single round of statistical computation can take several minutes, hours, or even days to complete. The targets R package keeps results up to date and reproducible while minimizing the number of expensive tasks that actually run. targets arranges the steps of your pipeline, skips costly runtime for steps that are already up to date, runs the rest with optional implicit parallel computing, abstracts files as R objects, and shows tangible evidence that the output matches the underlying code and data. In other words, the package saves time while increasing your ability to trust the results. This hands-on workshop teaches targets using a realistic case study from , to an 2018 RStudio AI Blog post by Matt Dancho: https://blogs.rstudio.com/ai/posts/2018-01-11-keras-customer-churn. Participants gradually build up a targets-powered machine learning pipeline through guided hands-on R programming exercises.

Browser access

  1. Sign up for a free account at https://rstudio.cloud.
  2. Log into https://rstudio.cloud/project/1699460 to access a free instance of RStudio Server in the cloud.
  3. Proceed through the R notebooks in the syllabus in order.

Local access

  1. Install R from https://www.r-project.org.
  2. Install RStudio Desktop from https://rstudio.com/products/rstudio/download/#download.
  3. Download or clone the code at https://github.com/wlandau/targets-tutorial.
  4. Open the tutorial as an RStudio project in the RStudio Desktop.
  5. Run the setup script to install the required R and Python packages.

Help

Post an issue to https://github.com/wlandau/targets-tutorial to ask for help. Be sure to follow the code of conduct.

Syllabus

TopicMaterials
Introslides
Functions1-functions.Rmd
Pipelines2-pipelines.Rmd
Changes3-changes.Rmd
Debugging4-debugging.Rmd
Files5-files.Rmd
Branching6-branching.Rmd
Challenge7-challenge.Rmd

Schedule

This schedule budgets time for a 4-hour iteration of the workshop (8 AM to noon).

TopicFormatBreakout roomsMinutesStartEndMaterials
Intro presentationlectureno208:008:20slides
Q&Adiscussionno108:208:30slides
Functions for the case studyexercisesyes158:308:451-functions.Rmd
Review functionslectureno58:458:501-functions.Rmd
Breakbreakno108:509:00
Build up a pipelineexercisesyes209:009:202-pipelines.Rmd
Review building up a pipelinelectureno59:209:252-pipelines.Rmd
Iterate on changesexercisesyes209:259:453-changes.Rmd
Review iterating on changeslectureno59:459:503-changes.Rmd
Breakbreakno109:5010:00
Debugging pipelinesexercisesyes2010:2510:454-debugging.Rmd
Review debugging pipelineslectureno510:4510:504-debugging.Rmd
Breakbreakno1010:5011:00
External filesexercisesyes2010:0010:205-files.Rmd
Review external fileslectureno510:2010:255-files.Rmd
Dynamic branchingexercisesyes2011:0011:206-branching.Rmd
Review dynamic branchinglectureno511:2011:256-branching.Rmd
Challenge exerciseexercisesyes2011:2511:457-challenge.Rmd
Review challenge exerciselectureno511:4511:507-challenge.Rmd
Q&Adiscussionno1011:5012:00

References