Learn R Programming

fakemake (version 1.9.0)

write_makefile: Write a Makelist to File

Description

The makelist is parsed before writing, so all R code which is not in a "code" item will be evaluated. So if any other item's string contains code allowing for a dynamic rule, for example with some "dependencies" reading "list.files(\"R\", full.names = TRUE)", the Makefile will have the evaluated code, a static list of files in the above case.

Usage

write_makefile(make_list, path, Rbin = "Rscript-devel")

Arguments

make_list

The list to write to file.

path

The path to the file.

Rbin

The R binary to use in the Makefile.

Value

See MakefileR::write_makefile.

Examples

Run this code
# NOT RUN {
make_file <- file.path(tempdir(), "my_Makefile")
write_makefile(provide_make_list(), path = make_file)
cat(readLines(make_file), sep = "\n")
# }

Run the code above in your browser using DataLab