Description Usage Arguments Details Value Author(s) References See Also Examples
Calculate transitivity for an undirected graph
1 | transitivity(g)
|
g |
an instance of the |
For an undirected graph G
, let delta(v) be the number of triangles with
v
as a node, let tau(v) be the number of triples, i.e., paths of length 2 with
v
as the center node.
Define transitivity T(G) = sum(delta(v)) / sum(tau(v)), for all v in V.
Transitivity for graph g
.
Li Long li.long@isb-sib.ch
Approximating Clustering Coefficient and Transitivity, T. Schank, D. Wagner, Journal of Graph Algorithms and Applications, Vol. 9, No. 2 (2005).
clusteringCoef, clusteringCoefAppr, graphGenerator
1 2 3 4 5 | con <- file(system.file("XML/conn.gxl",package="RBGL"))
g <- fromGXL(con)
close(con)
tc <- transitivity(g)
|
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colMeans, colSums, colnames, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.