count_neighbors: Count the neighbors of a node.

View source: R/UpdateKlass-graph-navigate.R

count_neighborsR 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.


klassR documentation built on April 4, 2025, 4:16 a.m.