Learn R Programming

DiagrammeR (version 0.7)

edge_relationship: 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_relationship(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
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.