add_node | R Documentation |
add_node()
will place a new node in the specified pipeline. This will be executed sequentially when the pipeline is executed using run()
add_node(pipeline, component, name, input, ...)
pipeline |
an initialized sewage pipeline |
component |
a function to be executed. Must be a valid function specification or exported sewage object including |
name |
a name to give to the given component. This will be used as the 'input' parameter for downstream nodes |
input |
the node to use as input into 'component'. Inputs should be either (1) the name of an existing node in the pipeline, or (2) the name(s) of any argument(s) in the first ndoe of the pipeline. These names can be whatever you want, but should match the arguments you pass to |
... |
additional arguments to be passed to the 'component' argument |
a sewage_pipeline
object
my_func = function(df) {
df %>%
head(15)
}
pipeline = Pipeline()
pipeline = pipeline |>
add_node(name = 'processor', component = my_func, input = 'file')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.