m <- get.resid(all.thick, covars)
myPerms <- shuffleSet(n=nrow(m$resids), nset=1e3)
out <- permute.group(myPerms, densities[N], m$resids, 'graph', atlas='dk')
out <- permute.group(myPerms, densities[N], m$resids, 'vertex')
out <- permute.group(myPerms, densities[N], m$resids, 'other',
.function=myFun)Run the code above in your browser using DataLab