chooseRefugeCells: Choose refuge cells from a plot of the landscape used in the...

View source: R/chooseCells.R

chooseRefugeCellsR Documentation

Choose refuge cells from a plot of the landscape used in the simulations.

Description

Interactive function allowing a user to identify specific cells on the landscape, which can be used as starting locations for a forward-time demographic simulation.

Usage

chooseRefugeCells(r)

Arguments

r

this is the surface (a single raster layer)

Details

Interactive function using locator() to identify cell IDs from user input. Assumes refugia include a central cell and adjacent cells in each cardinal direction (5 total).

Value

A vector of five cell IDs associated with the user-specified refuge location

See Also

locator, getpophist2.cells

Examples

library(holoSimCell)
rs <- raster::brick(paste0(system.file("extdata","rasters",package="holoSimCell"),"/","study_region_daltonIceMask_lakesMasked_linearIceSheetInterpolation.tif"))
chooseRefugeCells(rs[[1]])


stranda/holoSimCell documentation built on Aug. 4, 2023, 1:12 p.m.