Description Usage Arguments Details Value Author(s) References See Also Examples
network.dyadcount
returns the number of possible dyads within a network
, removing those flagged as missing if desired. If the network is directed, directed dyads are counted accordingly.
1 | network.dyadcount(x, na.omit = TRUE)
|
x |
an object of class |
na.omit |
logical; omit edges with |
The return value network.dyadcount
is equal to the number of dyads, minus the number of NULL
edges (and missing edges, if na.omit==TRUE
). If x
is directed, the number of directed dyads is returned. If the network allows loops, the number of possible entries on the diagnonal is added. Allthough the function does not give an error on multiplex networks or hypergraphs, the results probably don't make sense.
The number of dyads in the network
Mark S. Handcock handcock@stat.washington.edu, skyebend
Butts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of Statistical Software, 24(2). http://www.jstatsoft.org/v24/i02/
get.network.attribute
, network.edgecount
, is.directed
1 2 3 4 5 6 7 | #Create a directed network with three edges
m<-matrix(0,3,3)
m[1,2]<-1; m[2,3]<-1; m[3,1]<-1
g<-network(m)
network.dyadcount(g)==6 #Verify the directed dyad count
g<-network(m|t(m),directed=FALSE)
network.dyadcount(g)==3 #nC2 in undirected case
|
network: Classes for Relational Data
Version 1.16.1 created on 2020-10-06.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
Mark S. Handcock, University of California -- Los Angeles
David R. Hunter, Penn State University
Martina Morris, University of Washington
Skye Bender-deMoll, University of Washington
For citation information, type citation("network").
Type help("network-package") to get started.
[1] TRUE
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.