if (FALSE) {
# Create a list, one for each threshold
g <- vector('list', length(thresholds))
for (i in seq_along(thresholds)) {
g[[i]] <- make_brainGraphList(A.norm.sub[[i]], thresholds[i], atlas,
covars.dti$Study.ID, covars.dti$Group, modality='dti', weighting='fa')
}
}
if (FALSE) {
# Subset the first 10 subjects, irrespective of group
my.bgl[1:10]
# Return object for only 'Control' subjects
my.bgl[, 'Control']
# Return object with graphs from groups 1 and 3
my.bgl[g=c(1, 3), drop=FALSE]
# Subset the first 10 subjects of group 2
my.bgl[1:10, 2]
}
if (FALSE) {
## Convert old version single-subject graph lists
## g[[1]] is group 1, g[[1]][[1]] is threshold 1, g[[1]][[1]][[1]] is subj. 1
kNumThresholds <- length(g[[1]])
g.l <- vector('list', kNumThresholds)
for (i in seq_len(kNumThresholds)) {
g.l[[i]] <- as_brainGraphList(do.call(Map, c(c, g))[[i]])
}
}
Run the code above in your browser using DataLab