mlr3pipelines (version 0.5.1)

mlr_graphs_greplicate: Create Disjoint Graph Union of Copies of a Graph

Description

Create a new Graph containing n copies of the input Graph / PipeOp. To avoid ID collisions, PipeOp IDs are suffixed with _i where i ranges from 1 to n.

All input arguments are cloned and have no references in common with the returned Graph.

Usage

pipeline_greplicate(graph, n)

Value

Graph containing n copies of input graph.

Arguments

graph

Graph
Graph to replicate.

n

integer(1) Number of copies to create.

See Also

Other Graph operators: %>>%(), as_graph(), as_pipeop(), assert_graph(), assert_pipeop(), chain_graphs(), greplicate(), gunion()

Examples

Run this code
library("mlr3")

po_pca = po("pca")
pipeline_greplicate(po_pca, n = 2)

Run the code above in your browser using DataLab