plot_brain.jeek: plot 3d brain network from jeek result

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_brain.R

Description

This function plots 3d brain network from jeek result

Usage

1
2
3
4
## S3 method for class 'jeek'
plot_brain(x, type = "task", neighbouroption = "task",
  subID = NULL, index = NULL, hastitle = TRUE, haslegend = TRUE,
  hasbackground = TRUE, ...)

Arguments

x

output generated from jeek function (jeek class)

type

type of graph. There are four options:

  • "task" (graph for each task (including shared part) specified further by subID (task number))

  • "share" (shared graph for all tasks)

  • "taskspecific" (graph for each task specific graph (excluding shared part) specified further by subID (task number) )

  • "neighbour" (zoom into nodes in the graph specified further by neighbouroptoin, subID (task number) and index (node id))

neighbouroption

determines what type of graph to zoom into when parameter "type" is "neighbour". There are two options:

  • "task" (zoom into graph for each task (including shared part))

  • "taskspecific" (zoom into graph for each task specific (excluding shared part))

subID

selects which task to display. There are four options:

  • 0 (only allowed when "type" is "task" or "type" is "neighbour" and "neighbouroption" is "task") (selects share graph)

  • positive task number (selects that particular task)

  • a vector of task number (selects multiple tasks)

  • NULL (selects all tasks (all graphs))

index

determines which node(s) to zoom into when parameter "type" is "neighbour". This parameter could either be an integer or vector of integers representing node ids (zoom into one node or multiple nodes)

hastitle

determines whether the graph title is displayed or not (TRUE to display / FALSE to hide)

haslegend

determines whether the graph legend is displayed or not (TRUE to display / FALSE to hide)

hasbackground

determines whether the reference brain is plotted or not (TRUE to display / FALSE to hide)

...

extra parameters passed to igraph::rglplot()

Details

The function plots brain network using rglplot.igraph

Value

3d (rgl) brain network

Author(s)

Zhaoyang Wang (Author), Zhaoyang Wang (maintainer) zw4dn@virginia.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(JointNets)
graphics.off()
par(ask=FALSE)
par(mfrow=c(1,1))
data(ABIDE_aal116_timeseries)
data(aal116coordinates)
layout = cbind(aal116coordinates$x.mni + 90,
aal116coordinates$y.mni+126, aal116coordinates$z.mni+72)
result = simulation(p=116, s = 0.001, ss = 0.001, n = c(1,1))$simulatedgraphs
class(result) = "simule"
plot_brain(result, type = "task", neighbouroption = "task",
subID = NULL, index = NULL, layout = layout, hasbackground = FALSE)

result = jeek(X = ABIDE_aal116_timeseries,0.25,
covType = "kendall",parallel = FALSE)
plot_brain(result, type = "task", neighbouroption = "task",
subID = NULL, index = NULL, layout = layout)

JointNets documentation built on July 30, 2019, 1:02 a.m.