I do seem to be having some issues with this.
I made some slight edits to the corr.matrix function, on the basis that it was still cutting out negative edges as it taking any r > 0. This I have managed to fix and I thus have an undirected, weighted graph (308*308) with both positive and negative edge weights.
However, when I try ad apply the graph attributed to the object, this seems to fail at the stage of shortest paths. The input and resultant error is :
> g <- Map(function(x, y) llply(x, set_brainGraph_attr, atlas=atlas,
+ modality=modality, group=y, .progress='text'),
+ g, as.list(groups))
Error in { :
task 1 failed - "At structural_properties.c:5313 : cannot run Bellman-Ford algorithm, Negative loop detected while calculating shortest paths"
In addition: Warning message:
In .fun(piece, ...) :
I am also able to replicate this error with the original corr.matrix function if I proceed to give it a similarly high density (i.e. .95 and .9).
Is there a way to get past this issue. The only graph attributes I am interested in at the moment are the global and nodal strength.
Thanks again
Dan