Learn R Programming

klassR (version 1.0.2)

count_neighbors: Count the neighbors of a node.

Description

Count the neighbors of a node.

Usage

count_neighbors(graph, node, mode)

Value

A numeric vector of length one giving the number of neighbors.

Arguments

graph

A graph generated by klass_graph.

node

A node as returned by klass_node or V.

mode

Whether to query outgoing (‘out’), incoming (‘in’) edges, or both types (‘all’). This is ignored for undirected graphs.