powered by
Retrieve a node from a graph by name.
cg_graph_get(graph, name)
cg_graph object, graph containing the node to be retrieved.
character scalar, name of the node to be retrieved.
cg_node object.
# NOT RUN { # Initialize a computational graph graph <- cg_graph() # Add an input a <- cg_input(name = "a") # Retrieve input a b <- cg_graph_get(graph, "a") # Check equality identical(a, b) # }
Run the code above in your browser using DataLab