mapRm: Remove objects from a 'map'

View source: R/map.R

mapRmR Documentation

Remove objects from a map

Description

Remove objects from a map

Usage

mapRm(map, layer, ask = TRUE, ...)

## S3 method for class 'map'
mapRm(map, layer = NULL, ask = TRUE, ...)

Arguments

map

TODO: document this

layer

TODO: document this

ask

TODO: document this

...

TODO: document this

See Also

Other mapMethods: crs,map-method, rasterToMatch,map-method, rasters(), studyArea(), studyAreaName()

Other mapMethods: crs,map-method, rasterToMatch,map-method, rasters(), studyArea(), studyAreaName()

Examples

if (require("SpaDES.tools", quietly = TRUE)) {
  p <- terra::vect(cbind(-120, 60), crs = "epsg:4326") |>
    SpaDES.tools::randomPolygon(area = 1e5) |>
    sf::st_as_sf() |>
    sf::as_Spatial()
  m <- mapAdd(p, layerName = "p")
  m

  m <- mapRm(m, "p")
  m
}

PredictiveEcology/map documentation built on June 15, 2025, 6:15 a.m.