Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with reshape masking "melt" in ggcorrplot #4

Closed
kassambara opened this issue Dec 21, 2016 · 0 comments
Closed

issue with reshape masking "melt" in ggcorrplot #4

kassambara opened this issue Dec 21, 2016 · 0 comments

Comments

@kassambara
Copy link
Owner

kassambara commented Dec 21, 2016

(e-mail from a user)

I’m using your “ggcorrplot” package, and I believe I have discovered a bug that occurs if the user also has the “reshape” package loaded.

Within your “ggcorrplot” function, you use reshape2::melt to reshape the correlation matrix into long format with this line:

corr <- reshape2::melt(corr, na.rm = TRUE)

You then plot the data by referring to variable names created by reshape2, “Var1” and “Var2”:

     p <- ggplot2::ggplot(corr, ggplot2::aes_string("Var1", "Var2", fill = "value"))

However, if the user also has the “reshape” package loaded, the variables are called “X1” and “X2” by default rather than “Var1” and “Var2.” This occurs even if “reshape2” is also loaded, due to the “melt” function being masked.

I am writing a function that requires using both the “reshape” package and your “ggcorrplot” function, and this causes a problem because I cannot run your function due to this bug. Would you be interested in investigating and correcting this problem?

kassambara added a commit that referenced this issue Dec 21, 2016
kassambara added a commit that referenced this issue Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant