count_neighbors {klassR}R Documentation

Count the neighbors of a node.

Description

Count the neighbors of a node.

Usage

count_neighbors(graph, node, mode)

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.

Value

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


[Package klassR version 1.0.2 Index]