graph.strength            package:igraph            R Documentation

_S_t_r_e_n_g_t_h _o_r _w_e_i_g_h_t_e_d _v_e_r_t_e_x _d_e_g_r_e_e

_D_e_s_c_r_i_p_t_i_o_n:

     Summing up the edge weights of the adjacent edges for each vertex.

_U_s_a_g_e:

     graph.strength (graph, vids = V(graph), mode = c("all", "out", "in", "total"),
           loops = TRUE, weights = NULL)

_A_r_g_u_m_e_n_t_s:

   graph: The input graph.

    vids: The vertices for which the strength will be calculated.

    mode: Character string, "out" for out-degree, "in" for in-degree or
          "all" for the sum of the two. For undirected graphs this
          argument is ignored.

   loops: Logical; whether the loop edges are also counted.

 weights: Weight vector. If the graph has a 'weight' edge attribute,
          then this is used by default. If the graph does not have a
          'weight' edge attribute and this argument is 'NULL', then a
          warning is given and 'degree' is called.

_V_a_l_u_e:

     A numeric vector giving the strength of the vertices.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras,
     Alessandro Vespignani: The architecture of complex weighted
     networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)

_S_e_e _A_l_s_o:

     'degree' for the unweighted version.

_E_x_a_m_p_l_e_s:

     g <- graph.star(10)
     E(g)$weight <- seq(ecount(g))
     graph.strength(g)
     graph.strength(g, mode="out")
     graph.strength(g, mode="in")

     # No weights, a warning is given
     g <- graph.ring(10)
     graph.strength(g)

