Run an R script if underlying files have changed, otherwise do nothing.
make(recipe, prereq, target, include = TRUE, engine = source,
debug = FALSE, force = FALSE, recon = FALSE, ...)
script filename.
one or more underlying files, required by the script. For example, data files and/or scripts.
one or more output files, produced by the script. Directory names can also be used.
whether to automatically include the script itself as a prerequisite file.
function to source the script.
whether to show a diagnostic table of files and time last modified.
whether to run the R script unconditionally.
whether to return TRUE
or FALSE
, without actually
running the R script.
passed to engine
.
TRUE
or FALSE
, indicating whether the script was run.
Stallman, R. M. et al. An introduction to makefiles. Chapter 2 in the GNU Make manual.
source
runs any R script, sourceTAF
is more
convenient for running a TAF script, and sourceAll
runs all TAF
scripts.
make
, makeTAF
, and makeAll
are
similar to the source
functions, except they avoid repeating tasks
that have already been run.
icesTAF-package
gives an overview of the package.
# NOT RUN {
make("model.R", "data/input.dat", "model/results.dat")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab