neighborsDegree: Summarize degree sequence of a vertex neighbors

Description Usage Arguments Value Examples

View source: R/indices.R

Description

For a given vertex, get its neighbors degree sequence, and summarize it with a function. Can be used to identify a kind of articulations points: if the minimal degree of a vertex neighbors is > 1, its deletion does not isolate another one.

Usage

1
2
3
4
5
6
7
neighborsDegree(
  g,
  vs = V(g),
  ngh.mode = c("all", "in", "out"),
  deg.mode = c("all", "in", "out"),
  FUN = min
)

Arguments

g

igraph object.

vs

igraph.vs; vertices sequence of which the local index will be calculated (default: all vertices).

ngh.mode

character; the neighbors mode, either 'all', 'in', 'out' (default: 'all').

deg.mode

character; the degree mode, either 'all', 'in', 'out' (default: 'all').

FUN

function used to summarize the degree sequence (default: min).

Value

A numeric vector of the same length than vertices sequence vs.

Examples

1
2
3
4
5
library(igraph)
set.seed(123)
g = erdos.renyi.game(10, 20, 'gnm', directed=TRUE)
plot(g)
neighborsDegree(g, FUN=max)

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.