Description Usage Arguments Value Note Author(s) Examples
Set a graph to be the active graph.
1 | cg_session_set_graph(graph)
|
graph |
cg_graph object, the graph that is activated. |
none.
Any nodes that are created are automatically added to the active graph. This also applies to operations that are created by overloaded S3 functions that do not follow the cg_<name> naming convention (such as primitive inflix functions '+' and '-').
Only one graph can be active at a time. The active graph can be changed by calling this function on another cg_graph object.
Ron Triepels
1 2 3 4 5 6 7 8 | # Initialize a computational graph
graph1 <- cg_graph()
# Initialize another computational graph. It becomes the active graph.
graph2 <- cg_graph()
# Set graph1 to be the active graph
cg_session_set_graph(graph1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.