pending_update_network {ergm}R Documentation

A (Relatively) Lightweight Read-Only Representation of Network Objects

Description

pending_update_network is an semi-internal class for passing around results of MCMC sampling, particularly when the result is used to start another MCMC sampler. It is deliberately loosely specified, and its structure and even name are subject to change.

Usage

pending_update_network(nw, update = NULL, response = if
  (is.character(update)) update)

is.pending_update_network(x)

## S3 method for class 'pending_update_network'
as.edgelist(x, ...)

## S3 method for class 'pending_update_network'
as.matrix(x, matrix.type = NULL,
  attrname = NULL, ...)

## S3 method for class 'pending_update_network'
as.network(x, ..., populate = TRUE)

## S3 method for class 'pending_update_network'
network.edgecount(x, na.omit = TRUE,
  ...)

## S3 method for class 'pending_update_network'
network.dyadcount(x, na.omit = TRUE,
  ...)

## S3 method for class 'pending_update_network'
network.size(x, ...)

## S3 method for class 'pending_update_network'
network.naedgecount(x, ...)

Arguments

nw

a network object.

update

a character string, a list with elements named "newnwtails", "newnwheads", and (optionally) "newnwweights", or "newedgelist", or NULL. See Details.

response, attrname

Name of edge attribute to get or set. If NULL, binary network is assumed.

na.omit

Whether missing edges should be counted. Note that missing edge information is not stored.

Details

The update argument controls the contents of the object depending on its mode:

NULL

Use nw's own edgelist, and don't set weights.

character

Use nw's own edgelist, and don't set weights for attribute specified by update.

a list

Use the elements of the list, dropping others.

Value

At this time, a pending_update_network object is (subject to change) a network object with all edges removed and with a network attribute ".update" containing a two or three column matrix with a (possibly valued) edge list. The third column name also indicates the edge attribute represented.

If update uses "newedgelist", it is copied directly; othewirse, "newnwtails", "newnwheads", and (optionally) "newnwweights" are converted to an edgelist.

Its class is set (not subclassed!) to pending_update_network, in order to prevent network accessors and modifiers from affecting it.

Methods (by generic)


[Package ergm version 3.10.4 Index]