Skip to contents

use_dsprrr_template() copies starter files for running dsprrr in a pipeline: a targets pipeline (_targets.R) that prepares data, optimizes and evaluates a module and pins the results, and a Quarto report (report.qmd). Edit the copies to fit your project.

Usage

use_dsprrr_template(
  template = c("targets", "quarto", "all"),
  path = ".",
  overwrite = FALSE
)

Arguments

template

"targets", "quarto" or "all".

path

Directory to copy into (default: the working directory). It is created if needed.

overwrite

Whether to replace existing files (default FALSE). Existing files are otherwise skipped with a warning.

Value

The paths of the created files, invisibly.

Examples

project <- file.path(tempdir(), "my-project")
use_dsprrr_template("targets", path = project)
#> Created: /tmp/Rtmp4xxnp9/my-project/_targets.R
list.files(project)
#> [1] "_targets.R"