drake_hpc_template_file | R Documentation |
See the example files from
drake_examples()
and drake_example()
for example usage.
drake_hpc_template_file(
file = drake::drake_hpc_template_files(),
to = getwd(),
overwrite = FALSE
)
file |
Name of the template file, including the "tmpl" extension. |
to |
Character vector, where to write the file. |
overwrite |
Logical, whether to overwrite an existing file of the same name. |
NULL
is returned,
but a batchtools template file is written.
drake_hpc_template_files()
,
drake_examples()
, drake_example()
,
shell_file()
## Not run:
plan <- drake_plan(x = rnorm(1e7), y = rnorm(1e7))
# List the available template files.
drake_hpc_template_files()
# Write a SLURM template file.
out <- file.path(tempdir(), "slurm_batchtools.tmpl")
drake_hpc_template_file("slurm_batchtools.tmpl", to = tempdir())
cat(readLines(out), sep = "\n")
# library(future.batchtools) # nolint
# future::plan(batchtools_slurm, template = out) # nolint
# make(plan, parallelism = "future", jobs = 2) # nolint
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.