Skip to contents

Metrics on changing sample scale

Usage

scale_window(
  landscape,
  percentages_col = NULL,
  percentages_row = NULL,
  what,
  stat,
  verbose = TRUE,
  progress = FALSE,
  ...
)

Arguments

landscape

Raster* Layer, Stack, Brick, SpatRaster (terra), stars, or a list of rasterLayers.

percentages_col

2-column matrix with coordinates or SpatialPoints.

percentages_row

String specifying plot shape. Either "circle" or "square"

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_l_mutinf", "lsm_l_ta").

stat

The function to be applied. See Details

verbose

If TRUE, warnings are printed.

progress

Print progress report.

...

Arguments passed on to calculate_lsm().

Value

tibble

Details

This function calculates the selected metrics in moving windows over the provided landscape.

Please be aware that the output is sligthly different to all other lsm-function of landscapemetrics.

The metrics can be specified by the arguments what, level, metric, name and/or type (combinations of different arguments are possible (e.g. level = "class", type = "aggregation metric"). If an argument is not provided, automatically all possibilities are selected. Only metrics on landscape level are supported for this function.

Examples

if (FALSE) {
percentages_col <- c(2, 4, 8, 16, 32, 64, 100)
percentages_row <- c(2, 4, 8, 16, 32, 64, 100)

what =  c("lsm_l_pr", "lsm_l_joinent")

stat <- "mean"

scale_window(landscape, percentages_col, percentages_row, what, stat)
}