clusteringCoefficient-methods(graph)
clusteringCoefficient-methods()所属R语言包:graph
Clustering coefficient of a graph
一个图的聚类系数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
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.
这个通用的功能graph类继承的对象。图需要有edgemode=="undirected"。如果edgemode=="directed",该函数将返回NULL。
用法----------Usage----------
## S4 method for signature 'graph'
clusteringCoefficient(object, selfLoops=FALSE)
参数----------Arguments----------
参数:object
An instance of the appropriate graph class.
适当的图类的一个实例。
参数:selfLoops
Logical. If true, the calculation takes self loops into account.
逻辑。如果情况属实,计算需要考虑的自我循环。
Details
详情----------Details----------
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.
为列印相邻的节点,如果selfLoops是FALSE,聚类系数为N /(N *(N-1)),其中N是这些节点之间的边数。节点该图可能不会有自我循环。如果selfLoops是TRUE,聚类系数为N /(N * N),其中N是这些节点之间,包括自我循环的边数。
值----------Value----------
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.
一个名为“数字向量与每个节点的聚类系数。与2个或更多的边缘节点,值是0和1之间。对于有没有边缘的节点,该函数返回的值不适用。对于有一个边缘节点,函数将返回NaN。
作者(S)----------Author(s)----------
Wolfgang Huber <a href="http://www.dkfz.de/mga/whuber">http://www.dkfz.de/mga/whuber</a>
举例----------Examples----------
set.seed(123)
g1 <- randomGraph(letters[1:10], 1:4, p=.3)
clusteringCoefficient(g1)
clusteringCoefficient(g1, selfLoops=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|