G |>
mutate(degree = centrality_degree(),
closeness = centrality_closeness(),
betweenness = centrality_betweenness()) |>
filter(name == "A")
# A tbl_graph: 1 nodes and 0 edges
#
# An unrooted tree
#
# Node Data: 1 × 4 (active)
name degree closeness betweenness
<chr> <dbl> <dbl> <dbl>
1 A 3 0.143 0.5
#
# Edge Data: 0 × 2
# ℹ 2 variables: from <int>, to <int>