as_graph {mlr3pipelines} | R Documentation |
Conversion to mlr3pipelines Graph
Description
The argument is turned into a Graph
if possible.
If clone
is TRUE
, a deep copy is made
if the incoming object is a Graph
to ensure the resulting
object is a different reference from the incoming object.
as_graph()
is an S3 method and can therefore be implemented
by other packages that may add objects that can naturally be converted to Graph
s.
By default, as_graph()
tries to
apply
gunion()
tox
if it is alist
, which recursively appliesas_graph()
to all list elements firstcreate a
Graph
with only one element ifx
is aPipeOp
or can be converted to one usingas_pipeop()
.
Usage
as_graph(x, clone = FALSE)
Arguments
x |
( |
clone |
( |
Value
Graph
x
or a deep clone of it.
See Also
Other Graph operators:
%>>%()
,
as_pipeop()
,
assert_graph()
,
assert_pipeop()
,
chain_graphs()
,
greplicate()
,
gunion()
,
mlr_graphs_greplicate