Last chance! 50% off unlimited learning
Sale ends in
Show correlation
show_correlation(
data,
method = "pearson",
diag = TRUE,
labels = FALSE,
vjust = 0,
text_size = 15
)
ggplot
Tibble with results of as returned by the landscapemetrics package.
Type of correlation. See link{cor}
for details.
If FALSE, values on the diagonal will be NA and not plotted.
If TRUE, the correlation value will be added as text.
Will be passed on to ggplot2 as vertical justification of x-axis text.
Text size of the plot.
The functions calculates the correlation between all metrics. In order to calculate correlations, for the landscape level more than one landscape needs to be present. All input must be structured as returned by the landscapemetrics package.
metrics <- calculate_lsm(landscape, what = c("patch", "class"))
show_correlation(data = metrics, method = "pearson")
if (FALSE) {
metrics <- calculate_lsm(landscape, what = c("patch", "class"))#'
correlations <- calculate_correlation(metrics)
show_correlation(data = correlations, method = "pearson")
}
Run the code above in your browser using DataLab