Robustness function

7 views
Skip to first unread message

Chia-Hao Shih

unread,
Mar 6, 2019, 9:02:19 AM3/6/19
to brainGraph-help
Hi Chris,

I got the following error message while using the robustness function.


Error in order(vertex_attr(g, measure), decreasing = TRUE) : 
  argument 1 is not a vector


Basically, I am trying to explore the association between network robustness/resilience and a clinical presentation in a patient group. I use CONN toolbox for imaging data processing and got connectivity matrixes for each individual patient. Then I use graph_from_edgelist from the igraph package to create individual graphs (after thresholding). However, when I use the robustness function in your BrainGraph package, I would get the abovementioned error message. I wonder if you could help me to solve this problem. I have pasted my code below as well as attached one graph from my participants here as  Rdata file.


robustness(Subj1, type = c("vertex"), measure = c("btwn.cent"), N = 1000)



Please let me know if you need additional information. Thanks in advance.


Best,
James
Subj1.Rdata

Chris Watson

unread,
Mar 6, 2019, 1:41:00 PM3/6/19
to brainGr...@googlegroups.com
I did not receive an error. What version of the package are you using? Please update brainGraph and try again. The function had been updated to work for situations such as yours (i.e., where the input graph does not have a "btwn.cent" vertex attribute). If you do not wish to update, try the following:

V(Subj1)$btwn.cent <- centr_betw(Subj1)$res

Otherwise, to update:
devtools::install_github('cwatson/brainGraph')

Chris

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/3e8a8cbc-fb39-4cd0-b8ae-083389dc46e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chia-Hao Shih

unread,
Mar 6, 2019, 2:18:41 PM3/6/19
to brainGraph-help
Hi Chris,

Thanks for the prompt response. I will try to figure this out and update my situation later.

Best,
James
Reply all
Reply to author
Forward
0 new messages