get_authority_centrality {DiagrammeR} | R Documentation

## Get the authority scores for nodes in the graph

### Description

Get the Kleinberg authority centrality scores for all nodes in the graph.

### Usage

    get_authority_centrality(graph, weights_attr = NULL)

### Arguments

`graph` | a graph object of class `dgr_graph`.
`weights_attr` | an optional name of the edge attribute to use in the adjacency matrix. If `NULL` then, if it exists, the `weight` edge attribute of the graph will be used.

### Value

a data frame with authority scores for each of the nodes.

### Examples

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

    # Get the authority centrality scores
    # for all nodes in the graph
    get_authority_centrality(graph)
    #>    id authority_centrality
    #> 1   1            0.0000000
    #> 2   2            0.0000000
    #> 3   3            0.3237777
    #> 4   4            0.0000000
    #> 5   5            0.8083310
    #> 6   6            0.8593282
    #> 7   7            0.7895083
    #> 8   8            0.4482946
    #> 9   9            0.8023324
    #> 10 10            1.0000000

[Package DiagrammeR version 0.9.2 Index]