5.3 Nodes, Edges and Graphs

POs are combined into Graph s. The manual way (= hard way) to construct a Graph is to create an empty one first, fill it with POs, and then connect edges between the POs. POs are identified by their $id. Note that the operations all modify the object in-place and return the object itself, so multiple modifications can be chained.

For this example we use the “pca” PO defined above and a new PO named “mutate”. The latter creates a new feature from existing variables.

The much quicker way is to use the %>>% operator to chain POs or Graph s. The same result as above can be achieved by doing

Now the Graph can be inspected using its $plot() function:

Chaining multiple POs of the same kind

If multiple POs of the same kind should be chained it is necessary to change the id to avoid name clashes. This can be done by either accessing the $id slot or during construction.