graph-edgeList: Find edges in a graph and edges not in a graph.

Description Usage Arguments Examples

Description

Returns the edges of a graph (or edges not in a graph) where the graph can be either a graphNEL object or an adjacency matrix.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
edgeList(object, matrix = FALSE)

## Default S3 method:
edgeList(object, matrix = FALSE)

edgeListMAT(adjmat, matrix = FALSE)

nonEdgeList(object, matrix = FALSE)

## Default S3 method:
nonEdgeList(object, matrix = FALSE)

nonEdgeListMAT(adjmat, matrix = FALSE)

Arguments

object

A graphNEL object or an adjacency matrix.

matrix

If TRUE the result is a matrix; otherwise the result is a list.

adjmat

An adjacency matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## A graph with edges
g  <- ug(~a:b + b:c + c:d)
gm <- graphNEL2M(g)
edgeList(g)
edgeList(gm)
edgeListMAT(gm)
edgeList(g, matrix=TRUE)
edgeList(gm, matrix=TRUE)
edgeListMAT(gm, matrix=TRUE)
nonEdgeList(g)
nonEdgeList(gm)
nonEdgeListMAT(gm)
## A graph without edges
g  <- ug(~a + b + c)
gm <- graphNEL2M(g)
edgeList(g)
edgeList(gm)
edgeListMAT(gm)
edgeList(g, matrix=TRUE)
edgeList(gm, matrix=TRUE)
edgeListMAT(gm, matrix=TRUE)
nonEdgeList(g)
nonEdgeList(gm)
nonEdgeListMAT(gm)

gRbase documentation built on May 29, 2017, 9:06 p.m.

Search within the gRbase package
Search all R packages, documentation and source code