edge_rel {DiagrammeR} | R Documentation

## Create, read, update, delete, or report status of an edge relationship

### Description

From a graph object of class `dgr_graph`, query an edge in the graph (defined by a pair of node IDs extant in the graph) and perform operations on the relationship for that edge.

### Usage

    edge_rel(graph, from, to, action = "read", value = NULL)

### Arguments

`graph` | a graph object of class `dgr_graph` that is created using `create_graph`.
`from` | a node ID from which the edge to be queried is outgoing.
`to` | a node ID to which the edge to be queried is incoming.

`action`

the operation to perform on the edge's relationship attribute. To remove a relationship from an edge, use either `delete`, `remove`, or `drop`. To add a relationship to an edge with no set relationship, use `add` or `create`. To update an edge relationship, use `update`. To return the value of an edge relationship, use `read`. To determine whether there is a set relationship, use `check`.

`value` | a string denoting the relationship, to be supplied when either adding or updating an edge relationship.

### Value

a graph object of class `dgr_graph`.

[Package DiagrammeR version 0.8.2 Index]