neighborhood: Adjacent vertices

View source: R/generic.R

neighborsR Documentation

Adjacent vertices

Description

neighbors - adjacent vertices

neighbors_in - adjacent vertices following incoming edges

neighbors_out - adjacent vertices following outgoing edges

Usage

neighbors(x, ...)

neighbors_in(x, ...)

neighbors_out(x, ...)

neighborhood(x, ...)

## S3 method for class 'datagraph_vertex'
neighbors_in(x, names = FALSE)

## S3 method for class 'datagraph'
neighbors_in(x, vertices, names = FALSE, useNames = TRUE)

## S3 method for class 'datagraph_vertex'
neighbors_out(x, names = FALSE)

## S3 method for class 'datagraph'
neighbors_out(x, vertices, names = FALSE, useNames = TRUE)

## S3 method for class 'datagraph'
neighbors(x, vertices, mode = "all", names = FALSE)

## S3 method for class 'datagraph'
neighborhood(x, vertices, order = 1000, mode = "all", names = FALSE)

Arguments

x

a datagraph object

...

args passed to the S3 methods

names

logical; when TRUE only names of the vertices are returned, when FALSE -> vertex objects are returned

vertices

see neighbors_in and neighbors_out methods

useNames

logical; when TRUE, a named list/vector is returned

mode

character; "all", "in" our "out

order

integer; how far from the node to look


vh-d/datagraphs documentation built on May 13, 2022, 1:42 p.m.