is_graph_simple {DiagrammeR} | R Documentation

## 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
    is_graph_simple(graph)
    #> [1] TRUE

[Package DiagrammeR version 0.9.2 Index]