make_with_dir {makepipe}R Documentation

Create a pipeline using roxygen tags

Description

Instead of maintaining a separate pipeline script containing calls to make_with_source(), you can add roxygen-like headers to the .R files in your pipeline containing the ⁠@makepipe⁠ tag along with ⁠@targets⁠, ⁠@dependencies⁠, and so on. These tags will be parsed by make_with_dir() and used to construct a pipeline. You can call a specific part of the pipeline that has been documented in this way using make_with_roxy().

Usage

make_with_dir(
  dir = ".",
  recursive = FALSE,
  build = TRUE,
  envir = new.env(parent = parent.frame()),
  quiet = getOption("makepipe.quiet")
)

make_with_roxy(
  source,
  envir = new.env(parent = parent.frame()),
  quiet = getOption("makepipe.quiet")
)

Arguments

dir

A character vector of full path names; the default corresponds to the working directory

recursive

A logical determining whether or not to recurse into subdirectories

build

A logical determining whether or not the pipeline will be built immediately or simply returned to the user

envir

The environment in which to execute the source or recipe. By default, execution will take place in a fresh environment whose parent is the calling environment.

quiet

A logical determining whether or not messages are signaled

source

The path to an R script which makes the targets

Details

Other than ⁠@makepipe⁠, which is used to tell whether a given script should be included in the pipeline, the tags recognised mirror the arguments to make_with_source(). In particular,

See the getting started vignette for more information.

Value

A Pipeline object

See Also

Other make: make_with_recipe(), make_with_source()

Examples

## Not run: 
# Create a pipeline from scripts in the working dir without executing it
p <- make_with_dir(build = FALSE)
p$build() # Then execute it yourself

## End(Not run)

[Package makepipe version 0.2.1 Index]