Learn R Programming

DiagrammeR (version 0.8.1)

select_nodes_by_degree: Get node degree values from nodes available in a selection

Description

From a graph object of class dgr_graph, get a vector of node ID values from nodes available in a selection.

Usage

select_nodes_by_degree(graph, degree_type, degree_values, node_attr = NULL,
  search = NULL, set_op = "union", nodes = NULL)

Arguments

graph
a graph object of class dgr_graph that is created using create_graph.
degree_type
the type of degree, either: in for the indegree, out for the outdegree, and both or degree for the total degree (i.e., indegree + outdegree).
degree_values
a logical expression with a comparison operator (>, <, ==, or !=) followed by a number for numerical filtering.
node_attr
an optional character vector of node attribute values for filtering the node ID values returned.
search
an option to provide a logical expression with a comparison operator (>, <, ==, or !=) followed by a number for numerical filtering, or, a regular expression for filtering the nodes returned through stri
set_op
the set operation to perform upon consecutive selections of graph nodes. This can either be as a union (the default), as an intersection, or, as a difference on the previous selection, if it exists.
nodes
an optional vector of node IDs for filtering list of nodes present in the graph.

Value

  • a graph object of class dgr_graph.