Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

show_cores

Show core area


Description

Show core area

Usage

show_cores(
  landscape,
  directions,
  class,
  labels,
  nrow,
  ncol,
  consider_boundary,
  edge_depth
)

## S3 method for class 'RasterLayer'
show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = FALSE,
  edge_depth = 1
)

## S3 method for class 'RasterStack'
show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = FALSE,
  edge_depth = 1
)

## S3 method for class 'RasterBrick'
show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = FALSE,
  edge_depth = 1
)

## S3 method for class 'stars'
show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = FALSE,
  edge_depth = 1
)

## S3 method for class 'list'
show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

Raster object

directions

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

class

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

labels

Logical flag indicating whether to print or not to print core labels. boundary should be considered as core

nrow, ncol

Number of rows and columns for the facet.

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

Details

The functions plots the core area of patches labeled with the corresponding patch id. The edges are the grey cells surrounding the patches and are always shown.

Value

ggplot

Examples

# show "global" core area
show_cores(landscape, class = "global", labels = FALSE)

# show the core area of every class as facet
show_cores(landscape, class = "all", labels = FALSE)

# show only the core area of class 1 and 3
show_cores(landscape, class = c(1, 3), labels = TRUE)

landscapemetrics

Landscape Metrics for Categorical Map Patterns

v1.5.2
GPL-3
Authors
Maximillian H.K. Hesselbarth [aut, cre] (<https://orcid.org/0000-0003-1125-9918>), Marco Sciaini [aut] (<https://orcid.org/0000-0002-3042-5435>), Jakub Nowosad [aut] (<https://orcid.org/0000-0002-1057-3721>), Sebastian Hanss [aut] (<https://orcid.org/0000-0002-3990-4897>), Laura J. Graham [ctb] (Input on package structure), Jeffrey Hollister [ctb] (Input on package structure), Kimberly A. With [ctb] (Input on package structure), Florian Privé [ctb] (Original author of underlying C++ code for get_nearestneighbour() function), Project Nayuki [ctb] (Original author of underlying C++ code for get_circumscribingcircle and lsm_p_circle), Matt Strimas-Mackey [ctb] (Bugfix in sample_metrics())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.