# with_graph

0th

Percentile

##### Evaluate a tidygraph algorithm in the context of a graph

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.

##### Usage
with_graph(graph, expr)
##### Arguments
graph

The tbl_graph to use as context

expr

The expression to evaluate

##### Value

The value of expr

• with_graph
##### Examples
# NOT RUN {
gr <- play_erdos_renyi(10, 0.3)

with_graph(gr, centrality_degree())

# }

Documentation reproduced from package tidygraph, version 1.1.2, License: MIT + file LICENSE

### Community examples

Looks like there are no examples yet.