Learn R Programming

ergm (version 3.9.4)

rlebdm: RLE-Compressed Boolean Dyad Matrix

Description

A simple class representing boolean (logical) square matrix run-length encoded in a column-major order.

Usage

rlebdm(x, n)

as.rlebdm(x, ...)

# S3 method for matrix as.rlebdm(x, ...)

# S3 method for edgelist as.rlebdm(x, ...)

# S3 method for network as.rlebdm(x, ...)

# S3 method for rlebdm as.matrix(x, ...)

# S3 method for rlebdm dim(x)

# S3 method for rlebdm print(x, compact = TRUE, ...)

# S3 method for rlebdm !(x)

# S3 method for rlebdm |(e1, e2)

# S3 method for rlebdm &(e1, e2)

# S3 method for rlebdm <(e1, e2)

# S3 method for rlebdm >(e1, e2)

# S3 method for rlebdm <=(e1, e2)

# S3 method for rlebdm >=(e1, e2)

# S3 method for rlebdm ==(e1, e2)

# S3 method for rlebdm !=(e1, e2)

# S3 method for rlebdm as.edgelist(x, prototype = NULL, ...)

Arguments

x

for rlebdm(), an rle() object or a vector that is converted to one; it will be coerced to logical() before processing; for as.rlebdm.matrix(), a matrix.

n

the dimensions of the square matrix represented.

...

additional arguments, currently unused.

compact

whether to print the matrix compactly (dots and stars) or to print it as a logical matrix.

e1, e2

arguments to the binary operations.

prototype

an optional network with network attributes that are transferred to the edgelist and will filter it (e.g., if the prototype network is given and does not allow self-loops, the edgelist will not have self-loops either,e ven if the dyad matrix has non-FALSE diagonal).

Methods (by generic)

  • as.rlebdm: Convert a square matrix of mode coercible to logical to an rlebdm.

  • as.rlebdm: Convert an object of class edgelist to an rlebdm object whose cells in the edge list are set to TRUE and whose other cells are set to FALSE.

  • as.rlebdm: Convert an object of class network to an rlebdm object whose cells corresponding to extant edges are set to TRUE and whose other cells are set to FALSE.

  • as.edgelist: Convert an rlebdm object to an edgelist: a two-column integer matrix giving the cells with TRUE values.

See Also

as.rlebdm.ergm_conlist()