landscape <- terra::rast(landscapemetrics::landscape)
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