clusteringCoefficient-methods     package:graph     R Documentation

_C_l_u_s_t_e_r_i_n_g _c_o_e_f_f_i_c_i_e_n_t _o_f _a _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     This generic function takes an object that inherits from the
     'graph'  class. The graph needs to have 'edgemode=="undirected"'.
     If it has 'edgemode=="directed"', the function will return NULL.

_U_s_a_g_e:

     ## S4 method for signature 'graph, ANY':
     clusteringCoefficient(object, selfLoops=FALSE)

_A_r_g_u_m_e_n_t_s:

  object: An instance of the appropriate graph class.

selfLoops: Logical. If true, the calculation takes self loops into
          account.

_D_e_t_a_i_l_s:

     For a node with n adjacent nodes, if 'selfLoops' is 'FALSE', the
     clustering coefficent is N/(n*(n-1)), where N is the number of
     edges between these nodes. The graph may not have self loops. If
     'selfLoops' is 'TRUE', the clustering coefficent is N/(n*n), where
     N is the number of edges between these nodes, including self
     loops.

_V_a_l_u_e:

     A named numeric vector with the clustering coefficients for each
     node. For nodes with 2 or more edges, the values are between 0 and
     1. For nodes that have no edges, the function returns the value
     NA. For nodes that have exactly one edge, the function returns
     NaN.

_A_u_t_h_o_r(_s):

     Wolfgang Huber <URL: http://www.dkfz.de/mga/whuber>

_E_x_a_m_p_l_e_s:

     set.seed(123)
     g1 <- randomGraph(letters[1:10], 1:4, p=.3)
     clusteringCoefficient(g1)
     clusteringCoefficient(g1, selfLoops=TRUE)

