get_eccentricity {DiagrammeR} | R Documentation

## Get node eccentricities

### Description

Get a data frame with node eccentricity values.

### Usage

    get_eccentricity(graph)

### Arguments

`graph` | a graph object of class `dgr_graph`.

### Value

a data frame containing eccentricity values by node ID value.

### Examples

    ## Not run:
    # Create a random graph
    graph <-
      create_random_graph(
        n = 10, m = 22,
        set_seed = 23)

    # Get the eccentricity values for all
    # nodes in the graph
    graph %>%
      get_eccentricity()
    #>    id eccentricity
    #> 1   1            4
    #> 2   2            4
    #> 3   3            3
    #> 4   4            4
    #> 5   5            3
    #> 6   6            2
    #> 7   7            2
    #> 8   8            0
    #> 9   9            1
    #> 10 10            0

    ## End(Not run)

[Package DiagrammeR version 0.9.2 Index]