Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_graph_simple

Is the graph a simple graph?


Description

Determine whether the graph is a simple graph. A simple graph is one that does not contain any loops nor any multiple edges.

Usage

is_graph_simple(graph)

Arguments

graph

A graph object of class dgr_graph.

Value

A logical value.

Examples

# Create a graph with 2 cycles
graph <-
  create_graph() %>%
  add_cycle(n = 4) %>%
  add_cycle(n = 3)

# Check if the graph is simple
graph %>% is_graph_simple()

DiagrammeR

Graph/Network Visualization

v1.0.6.1
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.