Learn R Programming

gRbase (version 1.8-4.5)

ugl2gn_: Coercion of graphs represented as lists

Description

FIXME

Usage

ugl2gn_(glist, vn = NULL)

ugl2M_(glist, vn = NULL, result = "matrix")

ugl2dm_(zz, vn = NULL)

ugl2sm_(zz, vn = NULL)

ugl2ig_(zz, vn = NULL)

dgl2gn_(glist, vn = NULL)

dgl2dm_(zz, vn = NULL)

dgl2sm_(zz, vn = NULL)

dgl2ig_(zz, vn = NULL)

dgl2M_(glist, vn = NULL, result = "matrix")

adl2gn_(zz)

adl2dm_(zz)

adl2sm_(zz)

adl2ig_(zz)

adl2M_(alist, result = "matrix")

M2adl_(amat)

M2ugl_(amat)

M2dgl_(amat)

M2adjList(amat)

M2ugList(amat)

M2dagList(amat)

ugList2graphNEL(glist, vn = NULL)

ugList2M(glist, vn = NULL, result = "matrix")

dagList2graphNEL(glist, vn = NULL)

dagList2M(glist, vn = NULL, result = "matrix")

adjList2M(alist, result = "matrix")

glist2adjMAT(glist, vn = NULL, result = "matrix")

Arguments

glist

A list of generators where a generator is a character vector. If interpreted as generators of an undirected graph, a generator is a complete set of vertices in the graph. If interpreted as generators of a dag, a generator (v1,...,vn) means that there will be arrows from v2,...,vn to v1.

vn

The names of the vertices in the graphs. These will be the row and column names of the matrix

result

FIXME

zz

An object representing a graph.

alist

An adjacency list.

amat

Adjacency matrix (dense or sparse dgCMatrix).

Examples

Run this code
# NOT RUN {
## Sparse and dense adjacency matrices converted to adjacency list 
g1 <- ug(~a:b + b:c + c:d, result="matrix")
g2 <- ug(~a:b + b:c + c:d, result="dgCMatrix")
M2adjList( g1 )
## M2adjList( g2 ) ## FIXME FAILS for sparse matrix

## Sparse and dense adjacency matrices converted to cliques
M2ugList( g1 )
## M2ugList( g2 ) ## FIXME Is there an issue here??
## Sparse and dense adjacency matrices converted to cliques
M2dagList( g1 )
## M2dagList( g2 ) ## Fails for sparse matrix

# }

Run the code above in your browser using DataLab