Skip to content

test.centrality only returns results for nodes[1] when multiple nodes are requested #37

@osaal

Description

@osaal

Hello,

I noticed a bug in the centrality testing part of the NCT function. When I give it a list of nodes to centrality test (using test.centrality = TRUE and nodes = list()), the function only returns the results for the first element in the list. Regardless of how many nodes are given, and where in the data frame they are ordered, it always returns the first variable of the original data.

I found that the problem lies in an indexing bug, where instead of selecting every requested node and their corresponding centrality test values from an intermediate variable "diffcen.permtemp", it selects the first value only. This occurs twice in the current master branch.

I have implemented a fix for this, which I can PR if that is okay. However, I built the fix based on branch with hash a56712e by @pinusm, not based on the main branch (as I was using their multi-core implementation at the time). Would it be better if the pull request for that branch, #32, is first merged, and then I submit a pull request for discussion to fix this problem?

This is my first time submitting an issue and potentially a PR, so I hope I am following the correct procedure!

Br,
Oliver Saal

(EDIT: Fixed the hash for the commit I branched from.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions