Description Usage Arguments Examples
View source: R/get_node_index.R
Some functions in the 'tidygraph' package require the index of a
node. This function evalutes an input expression in the
dplyr::filter()
function in the node tibble of a tidygraph object
and returns the indices of the nodes that pass.
1 | get_node_index(gr, expr)
|
gr |
a tidygraph |
expr |
an expression to be quoted and evaluated in the context of the node tibble of the tidygraph object |
1 2 3 | get_node_index(quick_barabasi(10), name == "B")
get_node_index(quick_barabasi(10), name %in% c("B", "C", "D"))
get_node_index(quick_barabasi(10), stringr::str_detect(name, "A|B|C"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.