| is_edge_loop | R Documentation | 
Determines whether an edge definition is a loop edge.
is_edge_loop(graph, edge)
graph | 
 A graph object of class   | 
edge | 
 A numeric edge ID value.  | 
A logical value.
# Create a graph that has multiple
# loop edges
graph <-
  create_graph() %>%
  add_path(n = 4) %>%
  add_edge(
    from = 1,
    to = 1) %>%
  add_edge(
    from = 3,
    to = 3)
# Get the graph's internal
# edge data frame
graph %>% get_edge_df()
# Determine if edge `4` is
# a loop edge
graph %>% is_edge_loop(edge = 4)
# Determine if edge `2` is
# a loop edge
graph %>% is_edge_loop(edge = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.