landscapemetrics (version 1.4.4)

calculate_correlation: Calculate correlation

Description

Calculate correlation

Usage

calculate_correlation(
  metrics,
  method = "pearson",
  diag = TRUE,
  simplify = FALSE
)

Arguments

metrics

Tibble with results of as returned by the landscapemetrics package.

method

Type of correlation. See link{cor} for details.

diag

If FALSE, values on the diagonal will be NA.

simplify

If TRUE and only one level is present, only a tibble is returned.

Value

list

Details

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.

Examples

Run this code
# NOT RUN {
metrics <- calculate_lsm(landscape, what = c("patch", "class"))
calculate_correlation(metrics, method = "pearson")

# }

Run the code above in your browser using DataCamp Workspace