node | R Documentation |
Node is a basic building block of an rflow DAG.
node$new(id = "node")
R6Class
object.
Nodes may represent different types of data targets (R objects, files, database tables), or jobs. Interconnected nodes together function as basic building elements of directed acyclic graph (DAG).
Nodes are implemented using R6 classes. There are various flavors of the basic node class (r_node, db_node, file_node) that have their specific requirements and features
Constructing nodes
from stored state
from lists (coming from TOML, YAML...)
Object of R6Class
with basic functionality for rflows.
$make()
or make(node)
This method is used to build/make targets. It recursively solves dependencies by building all targets for nodes declared or detected as a dependency.
$eval()
Compared to make()
, eval()
only runs the code/job associated with the node alone. It does not try to ensure all the dependencies are ready.
$process()
process()
is usually used internally by eval()
and should not be called directly
$value
Returns target's value. Targets such as database tables or csv files are automatically convert into R values.
$exists()
Checks whether the target exists or not.
$time_to_eval()
Returns a record(s) of time to evaluate.
id
character; unique id
env
character; name of a environment (container or group of objects)
name
character; object's name
desc
character; description
depends
character; vector of upstream nodes (other nodes this node is depending on)
vis_params_process()
node$vis_params_process(params)
set_id()
node$set_id(id, name, env)
set_persistence()
node$set_persistence(persistence)
print()
node$print(...)
label()
node$label()
title()
node$title()
new()
node$new( id = NULL, name = NULL, env = NULL, desc = NULL, tags = NULL, depends = NULL, trigger_defchange = NULL, trigger_condition = NULL, definition_hash = NULL, persistence = list(enabled = FALSE), .last_evaluated = NULL, .last_changed = NULL, .trigger_defchange = NULL, .time_to_eval = NULL, cache = NULL, mode = NULL, vis_params = NULL, validators = NULL, logging = FALSE, loggers = NULL, store = TRUE, ... )
store_state()
node$store_state(public_fields = NULL, private_fields = NULL)
update_definition()
node$update_definition( id = NULL, type = NULL, desc = NULL, tags = NULL, depends = NULL, definition_hash = NULL, trigger_condition = NULL, vis_params = NULL, validators = NULL, ..., store = TRUE, logging = FALSE, loggers = NULL, verbose = TRUE )
set_upstream()
node$set_upstream(obj)
set_downstream()
node$set_downstream(obj)
connect_to()
node$connect_to(id)
connect()
node$connect(verbose = TRUE)
get()
node$get()
remove()
node$remove()
check_trigger_condition()
node$check_trigger_condition()
check_triggers()
node$check_triggers(verbose = TRUE, verbose_prefix = "")
reset_triggers()
node$reset_triggers()
eval()
node$eval(verbose = TRUE, verbose_prefix = "")
process()
node$process(verbose = TRUE, verbose_prefix = "")
changed()
node$changed(verbose = TRUE, verbose_prefix = "")
make()
node$make( force = FALSE, verbose = TRUE, verbose_prefix = "", .visited = as.environment(list(ids = character())) )
validate()
node$validate(verbose = TRUE, verbose_prefix = "")
time_to_eval()
node$time_to_eval(what = getOption("RFLOW_TIME_TO_EVAL", "LAST"))
clone()
The objects of this class are cloneable with this method.
node$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.