Bugfix in CDdiagram.Nemenyi() #7
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I would like to fix a rather tricky bug (I run into it because the plot was not showing the correct connection lines):
The statement 'till <- which(ss[i,i:mx])' (line 282 in the original file) causes a bug because it does the following: First, it takes the i-th line of the matrix and removes the first (i-1) columns from it. Next, it computes (which-call) the indices of all TRUE-values in the remaining vector. However, actually required are the indices in the original i-th row (respecting the removed i-1 columns), i.e. the result from which() is too small by (i-1). By adding (i-1) after the which-call, the result was correct. Additionally, I added the 'till > i' condition because it might happen otherwise that there is a bar only "connecting" one workflow (e.g. if all pairwise differences are significant)
Finally my other changes are just removing the unused variable 'from' as well as fixing the code to avoid warnings (only the first element returned by which() is actually used).
Thanks
Björn