show_lsm: Show landscape metrics

Description Usage Arguments Details Value Examples

Description

Show landscape metrics on patch level printed in their corresponding patch.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
show_lsm(landscape, what, class, directions, consider_boundary, edge_depth,
  labels, label_lsm, nrow, ncol)

## S3 method for class 'RasterLayer'
show_lsm(landscape, what, class = "global",
  directions = 8, consider_boundary = FALSE, edge_depth = 1,
  labels = TRUE, label_lsm = FALSE, nrow = NULL, ncol = NULL)

## S3 method for class 'RasterStack'
show_lsm(landscape, what, class = "global",
  directions = 8, consider_boundary = FALSE, edge_depth = 1,
  labels = TRUE, label_lsm = FALSE, nrow = NULL, ncol = NULL)

## S3 method for class 'RasterBrick'
show_lsm(landscape, what, class = "global",
  directions = 8, consider_boundary = FALSE, edge_depth = 1,
  labels = TRUE, label_lsm = FALSE, nrow = NULL, ncol = NULL)

## S3 method for class 'stars'
show_lsm(landscape, what, class = "global",
  directions = 8, consider_boundary = FALSE, edge_depth = 1,
  labels = TRUE, label_lsm = FALSE, nrow = NULL, ncol = NULL)

## S3 method for class 'list'
show_lsm(landscape, what, class = "global",
  directions = 8, consider_boundary = FALSE, edge_depth = 1,
  labels = TRUE, label_lsm = FALSE, nrow = NULL, ncol = NULL)

Arguments

landscape

*Raster object

what

Patch level what to plot

class

How to show the labeled patches: "global" (single map), "all" (every class as facet), or a vector with the specific classes one wants to show (every selected class as facet).

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

labels

Logical flag indicating whether to print or not to print patch labels.

label_lsm

If true, the value of the landscape metric is used as label

nrow, ncol

Number of rows and columns for the facet.

Details

The function plots all patches with a fill corresponding to the value of the chosen landscape metric on patch level.

Value

ggplot

Examples

1
2
3
show_lsm(landscape, what = "lsm_p_area", directions = 4)
show_lsm(landscape, what = "lsm_p_shape", class = c(1, 2), label_lsm = TRUE)
show_lsm(landscape, what = "lsm_p_circle", class = 3, labels = TRUE)

r-spatialecology/landscapemetrics documentation built on May 20, 2019, noon