cwatson / brainGraph

Graph theory analysis of brain MRI data
173 stars 51 forks source link

Error in rich_club_norm: calling non-existing V(g)$degree #14

Closed psyguy closed 5 years ago

psyguy commented 5 years ago

Hi,

When using rich_club_norm() I get an error and a warning:

Error in seq_len(max.deg) : 
  argument must be coercible to non-negative integer
In addition: Warning message:
In max(V(g)$degree) : no non-missing arguments to max; returning -Inf

This is apparently due to the fact that the code calls V(g)$degree, while it's not calculated beforehand.

Am I right? Does it have a quick fix, or I do it myself?

psyguy commented 5 years ago

Apparently, this issue in the code was for the version 2.2.0 on CRAN, which is corrected on the latest version here (as unloading the package and devtools::install_github(...) solved it.)

cwatson commented 5 years ago

Thanks for posting, and for finding the solution.