1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/get_authority_centrality.R
3\name{get_authority_centrality}
4\alias{get_authority_centrality}
5\title{Get the authority scores for all nodes}
6\usage{
7get_authority_centrality(graph, weights_attr = NULL)
8}
9\arguments{
10\item{graph}{A graph object of class \code{dgr_graph}.}
11
12\item{weights_attr}{an optional name of the edge attribute to use in the
13adjacency matrix. If \code{NULL} then, if it exists, the \code{weight} edge
14attribute of the graph will be used.}
15}
16\value{
17a data frame with authority scores for each of the nodes.
18}
19\description{
20Get the Kleinberg authority centrality scores for all nodes in the graph.
21}
22\examples{
23# Create a random graph using the
24# `add_gnm_graph()` function
25graph <-
26  create_graph() \%>\%
27  add_gnm_graph(
28    n = 10,
29    m = 15,
30    set_seed = 23)
31
32# Get the authority centrality scores
33# for all nodes in the graph
34graph \%>\%
35  get_authority_centrality()
36
37# Add the authority centrality
38# scores to the graph as a node
39# attribute
40graph <-
41  graph \%>\%
42  join_node_attrs(
43    df = get_authority_centrality(.))
44
45# Display the graph's node data frame
46graph \%>\% get_node_df()
47
48}
49