scale_window: scale_window

Description Usage Arguments Details Value See Also Examples

View source: R/scale_window.R

Description

Metrics on changing sample scale

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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().

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.

Value

tibble

See Also

list_lsm
window_lsm
scale_sample

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
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)

## End(Not run)

landscapemetrics documentation built on Sept. 5, 2021, 5:20 p.m.