network {network}R Documentation

Networks

Description

Construct, coerce to, test for and print network objects.

Usage

network(x, vertex.attr=NULL, vertex.attrnames=NULL, directed=TRUE, 
     hyper=FALSE, loops=FALSE, multiple=FALSE, bipartite = FALSE, ...)
network.copy(x)
as.network(x, ...)
is.network(x)
print.network(x, matrix.type=which.matrix.type(x),
    mixingmatrices=FALSE, na.omit=TRUE, ...)
summary.network(object, na.omit=TRUE, mixingmatrices=FALSE, ...)

Arguments

x for network, a matrix giving the network structure in adjacency, incidence, or edgelist form; otherwise, an object of class network.
vertex.attr optionally, a list containing vertex attributes.
vertex.attrnames optionally, a list containing vertex attribute names.
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.
matrix.type one of "adjacency", "edgelist", "incidence".
object an object of class network.
na.omit logical; omit summarization of missing attributes in network?
mixingmatrices logical; print the mixing matrices for the discrete attributes?
... additional arguments.

Details

network constructs a network class object from a matrix representation.

network.copy creates a new network object which duplicates its supplied argument.

as.network tries to coerce its argument to a network, using the network function if necessary.

is.network tests whether its argument is a network (in the sense that it has class network).

print.network prints a network object in one of several possible formats. It also prints the list of global attributes of the network.

summary.network provides similar information.

Value

network, as.network, and print.network all return a network class object; is.network returns TRUE or FALSE.

Author(s)

Carter T. Butts buttsc@uci.edu and David Hunter dhunter@stat.psu.edu

References

Butts, C.T. 2002. ``Memory Structures for Relational Data in R: Classes and Interfaces'' Working Paper.

See Also

network.initialize, attribute.methods, as.network.matrix, as.matrix.network, deletion.methods, edgeset.constructors, network.indicators, plot.network

Examples

m <- matrix(rbinom(25,1,.4),5,5)
diag(m) <- 0
g <- network(m, directed=FALSE)
summary(g)

h <- network.copy(g)       #Note: h<-g will not have the same effect!
summary(h)

[Package network version 1.1 Index]