network.initialize {network} | R Documentation |
Create and initialize a network
object with n
vertices.
network.initialize(n, directed = TRUE, hyper = FALSE, loops = FALSE, multiple = FALSE, bipartite = FALSE)
n |
the number of vertices to initialize |
directed |
logical; should edges be interpreted as directed? |
hyper |
logical; are hyperedges allowed? |
loops |
logical; should loops be allowed? |
multiple |
logical; are multiplex edges allowed? |
bipartite |
count; should the network be interpreted as bipartite? If present (i.e., non-NULL) it is the count of the number of actors in the bipartite network. In this case, the number of nodes is equal to the number of actors plus the number of events (with all actors preceeding all events). The edges are then interpreted as nondirected. |
Generally, network.initialize
is called by other constructor functions as part of the process of creating a network.
An object of class network
Carter T. Butts buttsc@uci.edu
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/
g<-network.initialize(5) #Create an empty graph on 5 vertices