with_graph | R Documentation |
All tidygraph algorithms are meant to be called inside tidygraph verbs such
as mutate()
, where the graph that is currently being worked on is known and
thus not needed as an argument to the function. In the off chance that you
want to use an algorithm outside of the tidygraph framework you can use
with_graph()
to set the graph context temporarily while the algorithm is
being evaluated.
with_graph(graph, expr)
graph |
The |
expr |
The expression to evaluate |
The value of expr
gr <- play_gnp(10, 0.3)
with_graph(gr, centrality_degree())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.