• Stars
    star
    147
  • Rank 242,260 (Top 5 %)
  • Language
    HTML
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An interactive free online short course on the drake R package

Launch RStudio Cloud Launch RStudio Binder superseded lifecycle

Consider targets

The targets R package is the long-term successor of drake, and it is more robust and easier to use. Please visit https://books.ropensci.org/targets/drake.html for full context and advice on transitioning. A short course on targets is available at https://github.com/wlandau/targets-tutorial.

The drake short course

learndrake is a free online short course on the drake R package. With guided web-based hands-on exercises, you will gradually build up a drake-powered machine learning project and practice the fundamentals of drake. If you run into trouble or have questions along the way, please post an issue at https://github.com/wlandau/learndrake to ask for help.

How to take the course

  1. Read the intro slides at https://wlandau.github.io/learndrake and watch the video recording at https://ropensci.org/commcalls/2019-09-24.
  2. Sign up for a free RStudio Cloud account at https://rstudio.cloud.
  3. Log into the public RStudio Cloud workspace at https://rstudio.cloud/project/627076. You are now running an instance of RStudio Server with everything you need.
  4. In the “Files” pane of the IDE, locate the numbered folders with *.Rmd notebooks inside. Work through the notebooks in order.
Topic Notebook
Custom functions 1-functions/1-functions.Rmd
drake plans 2-plans/2-plans.Rmd
Changing workflows 3-changes/3-changes.Rmd
Static branching 4-static/4-static.Rmd
Dynamic branching 5-dynamic/5-dynamic.Rmd
Files and R Markdown 6-files/6-files.Rmd

Notebooks 3-changes/3-changes.Rmd and 4-static/4-static.Rmd rely on the following Shiny apps.

App Notebook
https://colorado.rstudio.com/rsc/learndrake/changes/ 3-changes/3-changes.Rmd
https://colorado.rstudio.com/rsc/learndrake/static/ 4-static/4-static.Rmd
https://colorado.rstudio.com/rsc/learndrake/planner/ 4-static/4-static.Rmd

The learndrake package

The learndrake R package contains the materials of the short course. It helps students take the workshop locally if they so choose, and it helps educators and administrators host the workshop from alternative platforms.

Installation

You can install learndrake from GitHub.

install.packages("remotes")
remotes::install_github("wlandau/learndrake")

To run the exercises locally, you will also need TensorFlow and Keras.

keras::install_keras()
# Check if the installation succeeded.
tensorflow::tf_config()

If you are using RStudio version 1.2.5003 and encounter this fatal error, consider downgrading TensorFlow to version 1.13.1. Note: install_keras() silently tries to upgrade TensorFlow to version >= 2, so you will need to run it with tensorflow = "1.13.1.

Usage

The functions in learndrake deploy and serve the course materials.

Function Purpose
save_notebooks() Save the *.Rmd notebooks to your computer.
view_slides() Open the intro slides in a web browser.
save_slides() Save the intro slides to your computer.
launch_app() Launch a supporting Shiny app.
save_app() Save the code files of a supporting Shiny app.

Accompanying resources

This short course focuses mostly on drake’s mental model and core concepts.

  • How to break up a project into functions.
  • How to think about and create drake plans.
  • How drake decides what is up to date and what is outdated.

The following resources cover important topics that did not make it into the syllabus.

In practice

  • Miles McBain’s excellent blog post explains the motivating factors and practical issues {drake} addresses for most projects, how to set up a project as quickly and painlessly as possible, and how to overcome common obstacles.
  • Miles’ dflow package generates the file structure for a boilerplate drake project. It is a more thorough alternative to drake::use_drake().
  • drake is heavily function-oriented by design, and Miles’ fnmate package automatically generates boilerplate code and docstrings for functions you mention in drake plans.

High-performance computing

Thanks

Thanks to For
Edgar Ruiz Uniting drake and keras at https://github.com/sol-eng/tensorflow-w-r and providing valuable advice on the construction of the course.
Matt Dancho Publishing the original blog post with the course’s underlying case study.
Eric Nantz Reviewing the materials and providing feedback.

More Repositories

1

crew

A distributed worker launcher
R
100
star
2

targets-tutorial

Short course on the targets R package
R
92
star
3

targets-shiny

Example Shiny app containing a targets pipeline.
R
60
star
4

drake-examples

Example workflows for the drake R package
R
57
star
5

targets-minimal

A minimal example data analysis project with the targets R package
R
56
star
6

targets-four-minutes

Get started with the {targets} R package in four minutes
R
29
star
7

targets-stan

An example project to validate a Stan model in a targets pipeline
R
26
star
8

txtq

A small message queue for interprocess communication
R
23
star
9

instantiate

Pre-compiled CmdStan models in R packages
R
21
star
10

drakeplanner

A web app to create new drake projects
R
20
star
11

crew.cluster

crew launcher plugins for traditional high-performance computing clusters
R
16
star
12

targetsketch

Sketch a pipeline of targets in an interactive web app
R
15
star
13

dotfiles

my .bashrc and related files
R
15
star
14

targets-keras

An example Keras pipeline with the targets R package
R
13
star
15

gpu

Materials for the Iowa State University Statistics Department fall 2012 lecture series on general purpose GPU computing.
TeX
13
star
16

appPackage

This Shiny app is a package! This package is a Shiny app!
R
11
star
17

grapes

Turn R functions into binary operators.
R
10
star
18

parallelRemake

Accelerate make/remake workflows in R.
HTML
10
star
19

JeffLeekMeme

True facts about Jeff Leek: https://yihui.name/en/2017/04/jeff-leek-facts/
R
9
star
20

crew.aws.batch

A {crew} launcher plugin for AWS Batch
R
9
star
21

rpharma2023-pipeline

R/Pharma 2023 workshop example code: leveraging {targets} and {crew} to simulate clinical trials
R
8
star
22

rmedicine2021-pipeline

Example code for a possible talk at R/Medicine 2021 (submitted and under review, accepted talks not yet determined)
HTML
8
star
23

targetopia

An R package ecosystem for democratized reproducible pipelines at scale
CSS
8
star
24

historicalborrowlong

Longitudinal Bayesian historical borrowing models
R
8
star
25

targets-debug

Slides and example code for debugging {targets} pipelines
R
7
star
26

workers

Persistent and transient parallel workers for R
R
7
star
27

fbseq

A fully Bayesian, CUDA-accelerated method of analyzing RNA-seq data
R
6
star
28

rpharma2023

R/Pharma 2023 workshop: leveraging {targets} and {crew} to simulate clinical trials
HTML
5
star
29

targets-intro

Introduction to the {targets} R package
HTML
5
star
30

remakeGenerator

Generate large remake-style workflows with minimal code.
HTML
5
star
31

larug2020

Presentation about the targets R package at the Los Angeles R Users Group Meetup
HTML
4
star
32

fbseqCUDA

CUDA-accelerated backend of fbseq for the MCMC.
C
3
star
33

fbseqStudies

comparison study for fbseq
R
3
star
34

downsize

Toggle the test and production versions of your workflow with the flip of a global option.
R
3
star
35

wlandau.github.io

Will Landau's portfolio
JavaScript
3
star
36

historicalborrow

Non-longitudinal Bayesian historical borrowing models
R
3
star
37

rna-seq-stan

A comparison of Eric's method to other methods
R
3
star
38

stantargets-talk

Presentation about the {stantargets} R package
R
3
star
39

wildcard

Templating for data frames.
R
2
star
40

r-lille-2021

Presentation about {targets} to the Lille R User Meetup Group
JavaScript
2
star
41

rmedicine2021-slides

Slides for a possible talk at R/Medicine 2021 (submitted and under review, accepted talks not yet determined)
HTML
2
star
42

stantargets-example-validation

A minimal example of the stantargets package
R
2
star
43

condo

This is a tutorial on how to log in and run R jobs on the Iowa State condo cluster.
2
star
44

rcppcuda

A skeleton R package that uses Rcpp, CUDA, and s4 classes. This is a learning exercise.
C++
2
star
45

ncb2023

Short course on Bayesian methods for nonclinical statisticians: https://github.com/wlandau/ncb2023
HTML
1
star
46

sdss2019

Venue: 2019 ASA Symposium on Data Science and Statistics
HTML
1
star
47

nyhackr2020

Presentation on targets at the New York Open Statistical Programming Meetup
HTML
1
star
48

rmedicine2020

Slides and source code for a talk about drake at R/Medicine 2020.
HTML
1
star
49

bayes-lund-2021

A talk on Target Markdown and {stantargets} at Bayes@Lund
HTML
1
star
50

stat305

TeX
1
star
51

targets-ohdsi

Presentation on {targets} to OHDSI
HTML
1
star
52

rpharma2020

Slides and source code for a talk about targets at R/Pharma 2020.
HTML
1
star
53

workflowHelper

Analyze multiple datasets in multiple ways with a smooth, efficient, parallelized, reproducible R workflow.
R
1
star