A Pipeline object is automatically constructed as calls to make_*() are made. It stores the relationships between targets, dependencies, and sources.

See also

Public fields

segments

A list of Segment objects

Methods


Method add_source_segment()

Add an edge to edges

Add any nodes in private$edges that are missing from private$nodes into private$nodes

Reconstruct Pipeline edges from Segment edges. Called primarily to update outofdateness

Add a pipeline segment corresponding to a make_with_source() call

Usage

Pipeline$add_source_segment(
  source,
  targets,
  dependencies,
  packages,
  envir,
  force
)

Arguments

source

The path to an R script which makes the targets

targets

A character vector of paths to files

dependencies

A character vector of paths to files which the targets depend on

packages

A character vector of names of packages which targets depend on

envir

The environment in which to execute the source or recipe.

force

A logical determining whether or not execution of the source or recipe will be forced (i.e. happen whether or not the targets are out-of-date)

new_edge

An data.frame constructed with new_edge()

Returns

The SegmentSource added to the Pipeline


Method add_recipe_segment()

Add a pipeline segment corresponding to a make_with_recipe() call

Usage

Pipeline$add_recipe_segment(
  recipe,
  targets,
  dependencies,
  packages,
  envir,
  force
)

Arguments

recipe

A language object which, when evaluated, makes the targets

targets

A character vector of paths to files

dependencies

A character vector of paths to files which the targets depend on

packages

A character vector of names of packages which targets depend on

envir

The environment in which to execute the source or recipe.

force

A logical determining whether or not execution of the source or recipe will be forced (i.e. happen whether or not the targets are out-of-date)

Returns

The SegmentRecipe added to the Pipeline


Method build()

Build all targets

Usage

Pipeline$build(quiet = getOption("makepipe.quiet"))

Arguments

quiet

A logical determining whether or not messages are signaled

Returns

self


Method clean()

Clean all targets

Usage

Pipeline$clean()

Returns

self


Method annotate()

Apply annotations to Pipeline

Usage

Pipeline$annotate(labels = NULL, notes = NULL)

Arguments

labels

A named character vector mapping nodes in the Pipeline onto labels to display beside them.

notes

A named character vector mapping nodes in the Pipeline onto notes to display on beside the labels (nomnoml) or as tooltips (visNetwork).


Method refresh()

Refresh Pipeline to check outofdateness

Usage

Pipeline$refresh()


Method nomnoml()

Display the pipeline with nomnoml

Usage

Pipeline$nomnoml(
  direction = c("down", "right"),
  arrow_size = 1,
  edge_style = c("hard", "rounded"),
  bend_size = 0.3,
  font = "Courier",
  font_size = 12,
  line_width = 3,
  padding = 16,
  spacing = 40,
  leading = 1.25,
  stroke = "#33322E",
  fill_arrows = FALSE,
  gutter = 5,
  edge_margin = 0
)

Arguments

direction

The direction the flowchart should go in

arrow_size

The arrowhead size

edge_style

The arrow edge style

bend_size

The degree of rounding in the arrows (requires edge_style=rounded)

font

The name of a font to use

font_size

The font size

line_width

The line width for arrows and box outlines

padding

The amount of padding within boxes

spacing

The amount of spacing between boxes,

leading

The amount of spacing between lines of text

stroke

The color of arrows, text, and box outlines

fill_arrows

Whether arrow heads are full triangles (TRUE) or angled (FALSE)

gutter

The amount space to leave around the flowchart

edge_margin

The amount of space to leave between boxes and arrows

Returns

self


Method visnetwork()

Display the pipeline with nomnoml

Usage

Pipeline$visnetwork(...)

Arguments

...

Arguments (other than nodes and edges) to pass to visNetwork::visNetwork()

Returns

self


Method print()

Display

Usage

Pipeline$print(...)

Arguments

...

Arguments (other than nodes and edges) to pass to visNetwork::visNetwork()

Returns

self


Method save_visnetwork()

Save pipeline visNetwork

Usage

Pipeline$save_visnetwork(file, selfcontained = TRUE, background = "white", ...)

Arguments

file

File to save HTML into

selfcontained

Whether to save the HTML as a single self-contained file (with external resources base64 encoded) or a file with external resources placed in an adjacent directory.

background

Text string giving the html background color of the widget. Defaults to white.

...

Arguments (other than nodes and edges) to pass to visNetwork::visNetwork()

Returns

self


Method save_nomnoml()

Save pipeline nomnoml

Usage

Pipeline$save_nomnoml(file, width = NULL, height = NULL, ...)

Arguments

file

File to save the png into

width

Image width

height

Image height

...

Arguments to pass to self$nomnoml()

Returns

self


Method clone()

The objects of this class are cloneable with this method.

Usage

Pipeline$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.