forked from richfitz/remake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remake.yml
44 lines (39 loc) · 1.72 KB
/
remake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## All R files that are used must be listed here:
sources:
- code.R
## Most of a remakefile will be targets. They can be listed in any
## order; whatever makes most sense. Files can be split up and
## included into the main file if you need to impose more structure.
targets:
## 'all' is a special target that will be used as the default
## target by 'remake'. It doesn't actually make anything but
## "depends" on other targets.
all:
depends: plot.pdf
## 'target_name' is a special variable here: it will pass 'data.csv'
## through to the function 'download_data()' so that the data are
## stored in the correct place.
data.csv:
command: download_data(target_name)
## 'processed' will be stored as an R object because it looks like
## an object name rather than a file name (file names have
## extensions or slashes in them). It will be saved across
## sessions. Because it uses "data.csv", remake will work out that
## this target depends on "data.csv".
processed:
command: process_data("data.csv")
## Specifying 'plot: true' here tells remake that you are creating a
## plot. It will sort out opening/closing the pdf device for you.
## Because 'myplot' uses 'processed', remake will work out that this
## target requires the processed target to be made first.
plot.pdf:
command: myplot(processed)
plot: true
## Like plot targets, there are also special knitr targets. This
## will arrange for "processed" to be available within the knit
## function, along with all functions defined in "code.R". This
## automatically depends on the file report.Rmd, and will be updated
## when that file changes or when "processed" changes.
report.md:
depends: processed
knitr: true