-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
enable plot for correlation matrix #65
Comments
Should be in general |
library(see)
print(summary(correlation::correlation(iris)))
#> Parameter | Petal.Width | Petal.Length | Sepal.Width
#> -------------------------------------------------------
#> Sepal.Length | 0.82*** | 0.87*** | -0.12
#> Sepal.Width | -0.37*** | -0.43*** |
#> Petal.Length | 0.96*** | |
plot(summary(correlation::correlation(iris))) Created on 2020-04-15 by the reprex package (v0.3.0) |
Didn't even know it worked for triangular plots :-D |
I'd say |
x <- summary(correlation::correlation(iris), redundant = TRUE)
x
#> Parameter | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width
#> ----------------------------------------------------------------------
#> Sepal.Length | 1.00*** | -0.12 | 0.87*** | 0.82***
#> Sepal.Width | -0.12 | 1.00*** | -0.43*** | -0.37***
#> Petal.Length | 0.87*** | -0.43*** | 1.00*** | 0.96***
#> Petal.Width | 0.82*** | -0.37*** | 0.96*** | 1.00***
plot(x, show_values = TRUE, show_p = TRUE) x <- summary(correlation::correlation(iris), redundant = FALSE)
x
#> Parameter | Petal.Width | Petal.Length | Sepal.Width
#> -------------------------------------------------------
#> Sepal.Length | 0.82*** | 0.87*** | -0.12
#> Sepal.Width | -0.37*** | -0.43*** |
#> Petal.Length | 0.96*** | |
plot(x, show_values = TRUE, show_p = TRUE) x <- summary(correlation::correlation(iris, method = "spearman"))
plot(x) Created on 2020-04-16 by the reprex package (v0.3.0) |
We could have the same heatmap but only the lower-left triangular
Also, we could rename the legend title (here .data$r) by the column name (r, rho etc.)
The text was updated successfully, but these errors were encountered: