SegmentRecipe {makepipe} | R Documentation |
Segment
Description
A Segment object is automatically constructed and attached to
the Pipeline when a call to make_*()
is made. It stores the relationships
between targets, dependencies, and sources.
Super class
makepipe::Segment
-> SegmentRecipe
Public fields
recipe
A chunk of R code which makes the
targets
Methods
Public methods
Inherited methods
Method new()
Initialise a new Segment
Usage
SegmentRecipe$new( id, recipe, targets, dependencies, packages, envir, force, executed, result, execution_time )
Arguments
id
An integer that uniquely identifies the segment
recipe
A chunk of R code which makes the
targets
targets
A character vector of paths to files
dependencies
A character vector of paths to files which the
targets
depend onpackages
A character vector of names of packages which
targets
depend onenvir
The environment in which to execute the instructions.
force
A logical determining whether or not execution of the
source
orrecipe
will be forced (i.e. happen whether or not the targets are out-of-date)executed
A logical, whether or not the instructions were executed
result
An object, whatever is returned by executing the instructions
execution_time
A difftime, the time taken to execute the instructions
Method update_result()
Update the Segment with new execution information
Usage
SegmentRecipe$update_result(executed, execution_time, result)
Arguments
executed
A logical, whether or not the instructions were executed
execution_time
A difftime, the time taken to execute the instructions
result
An object, whatever is returned by executing the instructions
Method execute()
Execute the Segment
Usage
SegmentRecipe$execute(envir = NULL, quiet = getOption("makepipe.quiet"), ...)
Arguments
envir
The environment in which to execute the instructions.
quiet
A logical determining whether or not messages are signaled
...
Additional parameters to pass to
base::eval()
Method clone()
The objects of this class are cloneable with this method.
Usage
SegmentRecipe$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
Other segment:
SegmentSource
,
Segment