Learn R Programming

fsbrain (version 0.5.5)

fs.surface.to.igraph: Create igraph undirected graph from a brain surface mesh.

Description

Create igraph undirected graph from a brain surface mesh.

Usage

fs.surface.to.igraph(surface)

Value

igraph::graph instance

Arguments

surface

an fs.surface instance as returned by subject.surface, an existing igraph (which will be returned as-is) or a string which is interpreted as a path to a surface file.

Examples

Run this code
if (FALSE) {
  # Find the one-ring neighbors of vertex 15 on the fsaverage left hemi:
  sf = subject.surface(fsaverage.path(T), "fsaverage", "white", "lh");
  g = fs.surface.to.igraph(sf);
  igraph::neighborhood(g, order = 1, nodes = 15);
}

Run the code above in your browser using DataLab