View source: R/count_loop_edges.R
count_loop_edges | R Documentation |
From a graph object of class dgr_graph
, get a count of all loop edges in
the graph.
count_loop_edges(graph)
graph |
A graph object of class |
A numeric vector of single length.
# Create an undirected, full graph
# with 3 nodes and all possible
# edges, including loop edges
graph <-
create_graph(
directed = FALSE) %>%
add_full_graph(
n = 3,
keep_loops = TRUE)
# Get a count of all loop edges
# in the graph
graph %>% count_loop_edges()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.