This function calculates the Spreading score of the desired nodes from a graph. Spreading score reflects the spreading potential of each node within a network and is one of the major components of the IVI.

  vertices = V(graph),
  weights = NULL,
  directed = FALSE,
  mode = "all",
  loops = TRUE,
  d = 3,
  scaled = TRUE



A graph (network) of the igraph class.


A vector of desired vertices, which could be obtained by the V function.


Optional positive weight vector for calculating weighted betweenness centrality of nodes as a requirement for calculation of spreading score. If the graph has a weight edge attribute, then this is used by default. Weights are used to calculate weighted shortest paths, so they are interpreted as distances.


Logical scalar, whether to directed graph is analyzed. This argument is ignored for undirected graphs.


The mode of Spreading score depending on the directedness of the graph. If the graph is undirected, the mode "all" should be specified. Otherwise, for the calculation of Spreading score based on incoming connections select "in" and for the outgoing connections select "out". Also, if all of the connections are desired, specify the "all" mode. Default mode is set to "all".


Logical; whether the loop edges are also counted.


The distance, expressed in number of steps from a given node (default=3). Distance must be > 0. According to Morone & Makse (, optimal results can be reached at d=3,4, but this depends on the size/"radius" of the network. NOTE: the distance d is not inclusive. This means that nodes at a distance of 3 from our node-of-interest do not include nodes at distances 1 and 2. Only 3.


Logical; whether the end result should be 1-100 range normalized or not (default is TRUE).


A numeric vector with Spreading scores.

See also


Other integrative ranking functions: comp_manipulate(), exir(), hubness.score(), ivi.from.indices(), ivi()


if (FALSE) {
MyData <-
My_graph <- graph_from_data_frame(MyData)
GraphVertices <- V(My_graph)
Spreading.score <- spreading.score(graph = My_graph, vertices = GraphVertices,
                                   weights = NULL, directed = FALSE, mode = "all",
                                   loops = TRUE, d = 3, scaled = TRUE)