powered by
Create a correlation grid plot to visualize correlations among the columns of a dataset
corrGrid( mat, display = c("all", "upper", "lower"), type = c("square", "circle", "text", "pie"), showDiag = "TRUE", pal = colorRampPalette(c("darkblue", "white", "darkred"))(100) )
A correlation grid plot
A square correlation matrix to visualise.
A character string, specifying the display type, one of "all", "upper", or "lower" (default: "all").
A character string, specifying the shape of the correlation coefficients, one of "square", "circle", or "text" (default: "square").
A logical value, if TRUE (default), the diagonal of the correlation matrix is shown.
A color palette function, used for the correlation coefficient colors.
cm <- cor(mtcars) corr_grid_plot <- corrGrid(mat = cm, type = 'square')
Run the code above in your browser using DataLab