brainconn | R Documentation |
brainconn
plots and returns a ggraph object of plotted brain connectivity matrix..
brainconn(
atlas,
background = "ICBM152",
view = "top",
conmat = NULL,
node.size = 4,
node.color = "network",
all.nodes = FALSE,
edge.color = "black",
edge.alpha = 0.8,
edge.width = 1,
edge.color.weighted = FALSE,
labels = FALSE,
show.legend = TRUE,
thr = NULL,
uthr = NULL,
scale.edge.width = NULL,
label.size = 1.5,
label.edge.weight = FALSE,
background.alpha = 1
)
background |
'ICBM152', currently the only background option |
view |
A sting to choose the view. Can be any of these: c("ortho", "top", "bottom", "left", "right") |
conmat |
A adjacency matrix. Can be binary, weights, directed or undirected. see example_* data. |
node.size |
A integer that determines the diameter of the nodes. Can also be a vector of integers with a length equal to the number of ROIs in the atlas |
node.color |
A string that sets the node color. e.g. "blue". If set to "network", then nodes will be colored according to the network column of the atlas |
all.nodes |
if |
edge.color |
A string that sets the edge color. e.g. "blue". |
edge.alpha |
Number between 0-1 to set the transparency of the edges. |
edge.width |
Number to set the width of the edges. |
edge.color.weighted |
A boolean that applies when the conmat is weighted. if |
labels |
if |
show.legend |
if |
thr |
a optional value to set a threshold on the conmat (e.g. edges with a weighted value lower than the one set here will not be shown) |
uthr |
a optional value to set a upper threshold on the conmat (e.g. edges with a weighted value higher than the one set here will not be shown) |
scale.edge.width |
If |
label.size |
If labels=TRUE then, |
label.edge.weight |
if |
background.alpha |
Number between 0-1 to set the transparency of the background. |
a ggraph object
Sidhant Chopra
library(brainconn)
x=matrix(0,84,84)
x[1:3,9:11]= 1:3 ;x[9:11,1:3]= 3:1
brainconn(atlas ="Desikan84", conmat=x,
view="ortho", node.size =2,
node.color = "pink",
edge.width = 1, edge.color="blue",
edge.alpha = 0.65,
edge.color.weighted = T,
scale.edge.width=T,
labels = T,
all.nodes =F,
show.legend = T,
label.size=3, background.alpha=1,
label.edge.weight=F)
#In order to learn more about the Desikan84 Atlas added to the package run the following command:
library(brainconn)
Desikan84=as.data.frame(Desikan84);Desikan84
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.