ggraph (version 0.1.1)

get_con: Create a connection extractor function


Connections within the ggraph terminology are links between nodes that are not part of the network structure itself. In that sense connections does not affect the layout calculation in any way and will not be drawn by the standard geom_edge_* functions. A connection does not need to only be defined by a start and end node, but can include intermediary nodes. get_con helps in creating connection data by letting you specify start and end node and automatically find the shortest path within the graph structure that connects the given points. If this is not what is needed it is also possible to supply a list of vectors giving node indexes that defines a connection.


get_con(from = integer(), to = integer(), paths = NULL, ...)


from, to
The index of the start and end nodes for the connections
A list of integer vectors giving the index of nodes defining connections
Additional information to be added to the final data output


A function that takes a layout_ggraph object and returns the given connections

See Also

Other extractors: get_edges, get_nodes