write_brainnet: Write files to be used for visualization with BrainNet Viewer

View source: R/write_brainnet.R

write_brainnetR Documentation

Write files to be used for visualization with BrainNet Viewer

Description

Write the .node and .edge files necessary for visualization with the BrainNet Viewer software.

Usage

write_brainnet(g, vcolor = "none", vsize = "constant",
  edge.wt = NULL, file.prefix = "")

Arguments

g

The igraph graph object of interest

vcolor

Character string indicating how to color the vertices (default: 'none')

vsize

Character string indicating what size the vertices should be; can be any vertex-level attribute (default: 'constant')

edge.wt

Character string indicating the edge attribute to use to return a weighted adjacency matrix (default: NULL)

file.prefix

Character string for the basename of the .node and .edge files that are written

Details

For the .node file, there are 6 columns:

  • Columns 1-3: Vertex x-, y-, and z-coordinates

  • Column 4: Vertex color

  • Column 5: Vertex size

  • Column 6: Vertex label

The .edge file is the graph's associated adjacency matrix; a weighted adjacency matrix can be returned by using the edge.wt argument.

Author(s)

Christopher G. Watson, cgwatson@bu.edu

References

Xia, M. and Wang, J. and He, Y. (2013). BrainNet Viewer: a network visualization tool for human brain connectomics. PLoS One, 8(7), e68910. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pone.0068910")}

Examples

## Not run: 
write_brainnet(g, vcolor='community', vsize='degree', edge.wt='t.stat')

## End(Not run)

cwatson/brainGraph documentation built on Feb. 21, 2024, 6:33 p.m.