Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_nodes

Create a node extractor function


Description

This function returns another function that can extract nodes from a ggraph_layout object. As a ggraph_layout object is essentially a data.frame of nodes it might seem useless to provide this function, but since the node data is not necessarily available until after the ggraph() call it can be beneficial to be able to add information to the node data on a per-layer basis. Unlike get_edges() the use of get_nodes is not mandatory and is only required if additional data should be added to selected node layers.

Usage

get_nodes(...)

Arguments

...

Additional data that should be cbind'ed together with the node data.

Value

A data.frame with the node data as well of any additional data supplied through ...

See Also

Other extractors: get_con(), get_edges()


ggraph

An Implementation of Grammar of Graphics for Graphs and Networks

v2.0.5
MIT + file LICENSE
Authors
Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.