Shows how to create a small-but-automated analytical pipeline using a
Makefile AND using
rmarkdown::render() on plain R scripts and R Markdown files, without the help of RStudio's buttons.
Demonstration data: the number of words spoken by various characters in the Lord of the Rings trilogy, available here:
- Clone this directory. For example, clone the entire course repo, which includes this directory.
- Start a fresh RStudio session, make sure this directory is the working directory.
- Run any scripts you like interactively.
- Run any script you like at arm's length, via
source()or RStudio Source button.
- In a shell, experiment with commands like these to cause scripts to be run:
lotr_clean.tsvwith other targets)
- Delete various intermediates "by hand" and use
make allto re-run necessary parts of the pipeline.
- Note all the HTML and Markdown reports left behind by this pipeline!