degree                package:igraph                R Documentation

_D_e_g_r_e_e _a_n_d _d_e_g_r_e_e _d_i_s_t_r_i_b_u_t_i_o_n _o_f _t_h_e _v_e_r_t_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The degree of a vertex is its most basic structural property, the
     number of its adjacent edges.

_U_s_a_g_e:

     degree(graph, v=V(graph), mode = c("all", "out", "in", "total"), loops = TRUE) 
     degree.distribution(graph, cumulative = FALSE, ...) 

_A_r_g_u_m_e_n_t_s:

   graph: The graph to analyze.

       v: The ids of vertices of which the degree will be calculated.

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

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

cumulative: Logical; whether the cumulative degree distribution is to
          be calculated.

     ...: Additional arguments to pass to 'degree', eg. 'mode' is
          useful but also 'v' and 'loops' make sense.

_V_a_l_u_e:

     For 'degree' a numeric vector of the same length as argument 'v'.

     For 'degree.distribution' a numeric vector of the same length as
     the maximum degree plus one. The first element is the relative
     frequency zero degree vertices, the second vertices with degree
     one,  etc.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_E_x_a_m_p_l_e_s:

     g <- graph.ring(10)
     degree(g)
     g2 <- erdos.renyi.game(1000, 10/1000)
     degree.distribution(g2)

