thank you for follow back. No, the outputs do not contain NAs nor infinite values.
Because of conflicts with another package I'm using (neuroCombat) I recently had to downgrade to v 2.7.0, but the error is still popping in this previous version too.
I've also noticed that while writing the .rds files in 'savedir' there are some subjects missed. For instance, my first group has 594 individuals and the saved files go from sub-001 to sub-004, misses sub-005, and then continue from sub-006. This happens at each threshold (5) with various subjects at it ends up generating graphs for only 142 participants.
Warning messages:
1: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed, :
scheduled cores 1, 2, 3, 4, 5, 6, 7, 8 did not deliver results, all values of the jobs will be affected
4: selectChildren(ac[!fin], -1)
3: mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,
mc.silent = silent, mc.cores = cores)
2: e$fun(obj, substitute(ex), parent.frame(), e$data)
1: foreach(k = seq_along(inds[[i]])) %dopar% {
g.tmp <- graph_from_adjacency_matrix(A.norm.sub[[j]][, ,
inds[[i]][k]], mode = "undirected", diag = F, weighted = T)
g.tmp <- set_brainGraph_attr(g.tmp, atlas, modality = "fmri",
weighting = "pearson", threshold = thresholds[j], subject = covars[groups[i],
Subject[k]], group = groups[i], use.parallel = F,
A = A.norm.sub[[j]][, , inds[[i]][k]])
saveRDS(g.tmp, file = paste0(savedir, sprintf("g%i_thr%02i_subj%03i%s",
i, j, k, ".rds")))
}