Description Usage Arguments Value Examples
View source: R/correlation.matrix.R
Produce a blue-scale heatmap of the correlation matrix for a given data.frame using ggplot2.
1 2 3 4 |
df |
Data frame whose columns will define the correlation matrix. |
method |
What type of correlation to use? Defaults to Spearman rank order correlation. |
scale |
Should we z-score correlations before plotting them? |
colors |
What color scheme should we use? |
Returns a ggplot object that can be easily saved or visualized.
1 2 3 4 5 6 7 | library('ggplots')
df <- data.frame(x = c(1, 2, 3, 4, 5), y = c(2, 3, 4, 4, 5), z = c(5, 3, 4, 1, 1))
p <- correlation.matrix(df)
p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.