Plot the correlation matrix for the provided layercodesSource:
plot_correlation creates a plot of the correlation between
matrix or dataframe. A square matrix with the layers correlations you want to plot as returned by
list. Optional list with as names the layercodes and as values the name of the layer to be used in the plot.
character vector. optional vector with 5 entries for the range of colors to be used for the correlation matrix plot.
This function requires ggplot2 and plots the correlations for the layers in the same order as the layercodes are provided to this function.
correlation <- layers_correlation(c("BO_calcite", "BO_damin", "MS_bathy_5m")) p <- plot_correlation(correlation) print(p)