getEdges: Get edges from a gGraph object

getEdgesR Documentation

Get edges from a gGraph object

Description

The function getEdges returns the edges of a gGraph object using different possible outputs.

Usage

getEdges(x, ...)

## S4 method for signature 'gGraph'
getEdges(x, res.type = c("asIs", "matNames", "matId"), unique = FALSE, ...)

Arguments

x

a valid gGraph.

...

other arguments passed to other methods (currently unused).

res.type

a character string indicating which kind of output should be used. See value.

unique

a logical indicating whether all returned edges should be unique (TRUE) or if duplicated edges should be allowed (TRUE, default).

Value

The output depends on the value of the argument res.type:

  • asIs: output is a named list of nodes, each slot containing nodes forming an edge with one given node. This format is that of the edges accessor for graphNEL objects.

  • matNames: a matrix with two columns giving couples of node names forming edges.

  • matId: a matrix with two columns giving couples of node indices forming edges.

Functions

  • getEdges(gGraph): Method for gGraph objects

See Also

Most other accessors are documented in gGraph manpage.

See setEdges to add/remove edges, or geo.add.edges and geo.remove.edges for interactive versions.

Examples


example(gGraph)

getEdges(x)
getEdges(x, res.type = "matNames")
getEdges(x, res.type = "matId")


thibautjombart/geograph documentation built on Jan. 27, 2024, 10 p.m.