New function to add customizable rectangles to correlation plots #185
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.
A colleague (Nathan Hebert) and I found a need to add arbitrary rectangles to the plots produced by corrplot. The context for this is psychological testing: rather than placing rectangles around empirical clusters as corrplot currently can do, we wanted to place rectangles on corrplots of items around the scales to which they belonged. Moreover, we wanted to be able to place rectangles off the diagonal around sets of items from different scales for which examining the correlation would be of interest (e.g., if items from two scales should be correlated, the rectangle would direct the reader's attention to these correlations).
There are two different functions:
We believe that this would be a useful pair of functions for users of the corrplot package who wish to examine the correlations either among known sets of variables or among variables that are hypothesized to have certain relationships - it has certainly been for us when producing reports in the area of psychological measurement. The .Rd files include examples of the use of these functions.
Please let me know if you have any questions. I'm not sure if these functions are of interest to you; if they are not, I can include them in a small R package I maintain as "Enhances" for corrplot.
P.S. I don't do many pull requests on GitHub, so apologies if I didn't quite do it right. We originally wrote these functions for version 0.85 master so there are some extra commits in there I guess.