pEdge-class {Rgraphviz} | R Documentation

## Class "pEdge": A class to represent an edge

### Description

This class is used to represent all necessary information to plot an edge in Graphviz

### Details

The `attrs` slot is a named list, where the names correspond to attributes and the values in the list correspond to the value for that element's attribute.

The `subG` slot describes which subgraph this edge is a part of. A value of `0` implies that the edge is not a member of any subgraph.

### Objects from the Class

Objects can be created by calls of the form `new("pEdge", ...)`.

### Slots

`from`:

  Object of class `"character"`: The name of the node on the tail of this edge.

`to`:

  Object of class `"character"`: The name of the node on the head of this edge.

`attrs`:

  Object of class `"list"`: A list of attributes specific to this edge.

`subG`:

  Object of class `"integer"`: Which subgraph this edge is a part of.

### Methods

from

  `signature(object = "pEdge")`: Retrieves the `from` slot of this edge

to

  `signature(object = "pEdge")`: Retrieves the `to` slot of this edge

### Author(s)

R. Gentleman and Jeff Gentry

### See Also

`pNode`, `agopen`, `buildEdgeList`

### Examples

       set.seed(123)
       V <- letters[1:10]
       M <- 1:4
       g1 <- randomGraph(V, M, .2)

       z <- buildEdgeList(g1)
       vv <- z[[1]]   ## Object of type pEdge

       vv
       from(vv)
       to(vv)

[Package Rgraphviz version 2.30.0 Index]