getV1fromVlist: Get 1 degree away vertexes

Description Usage Arguments Value Examples

Description

Returns a list of all vertex names that touch (going IN or OUT) from the specified vertex list.

Usage

1
getV1fromVlist(g, vlist, mode = "out")

Arguments

g

igraph object

vlist

list of starting node/vertex names

mode

'out' or 'in'. 'out' returns all the vertex/node names 1 degree out from vlist. 'in' returns all vertex/node names directed into vlist nodes.

Value

vector of node names that are 1 degree away from vlist

Examples

1
2
3
4
5
6
7
8
9
## build sample network
from <- c('A','A','B','B','C','C','D','D','E','E','E','F','F','H','L','L','O')
to <- c('B','C','D','E','F','G','H','I','J','J','K','L','G','M','N','O','P')
relations<-cbind(from,to)
g <- graph.data.frame(relations)
tiers <- c(1,2,3,4,1,3,4,2,1,2,3,4,0,0,1,2)
V(g)$tier <- tiers

getV1fromVlist(g, c('A', 'D'), 'to')

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.