Learn R Programming

brainGraph (version 3.1.0)

make_ego_brainGraph: Create a graph of the union of multiple vertex neighborhoods

Description

This function accepts multiple vertices, creates graphs of their neighborhoods (of order 1), and returns the union of those graphs.

Usage

make_ego_brainGraph(g, vs)

Value

An igraph graph object containing the union of all edges and vertices in the neighborhoods of the input vertices; only the vertex attribute name will be present

Arguments

g

An igraph graph object

vs

Either a character or integer vector (vertex names or indices, respectively) for the vertices of interest

Author

Christopher G. Watson, cgwatson@bu.edu

See Also

ego

Other Graph creation functions: Creating_Graphs_GLM, Creating_Graphs, brainGraphList

Examples

Run this code
if (FALSE) {
subg <- make_ego_brainGraph(g1[[N]], c(24, 58))
subg <- make_ego_brainGraph(g1[[N]], c('lPCUN', 'rPCUN'))
}

Run the code above in your browser using DataLab