This function prepares spatially explicit planning unit, species data, and landscape data layers for RAP processing.

make.RapData(
  pus,
  species,
  spaces = NULL,
  amount.target = 0.2,
  space.target = 0.2,
  n.demand.points = 100L,
  kernel.method = c("ks", "hypervolume")[1],
  quantile = 0.5,
  species.points = NULL,
  n.species.points = ceiling(0.2 * raster::cellStats(species, "sum")),
  include.geographic.space = TRUE,
  scale = TRUE,
  verbose = FALSE,
  ...
)

Arguments

pus

sp::SpatialPolygons() with planning unit data.

species

raster::raster() with species probability distribution data.

spaces

list of/or raster::raster() representing projects of attribute space over geographic space. Use a list to denote separate attribute spaces.

amount.target

numeric vector for area targets (%) for each species. Defaults to 0.2 for each attribute space for each species.

space.target

numeric vector for attribute space targets (%) for each species. Defaults to 0.2 for each attribute space for each species and each space.

n.demand.points

integer number of demand points to use for each attribute space for each species. Defaults to 100L.

kernel.method

character name of kernel method to use to generate demand points. Use either "ks" or "hypervolume".

quantile

numeric quantile to generate demand points within. If species.points intersect. Defaults to 0.5.

species.points

list of/or sp::SpatialPointsDataFrame() or sp::SpatialPoints() with species presence records. Use a list of objects to represent different species. Must have the same number of elements as species. If not supplied then use n.species.points to sample points from the species distributions.

n.species.points

numeric vector specifying the number points to sample the species distributions to use to generate demand points. Defaults to 20% of the distribution.

include.geographic.space

logical should the geographic space be considered an attribute space?

scale

logical scale the attribute spaces to unit mean and standard deviation? This prevents overflow. Defaults to TRUE.

verbose

logical print statements during processing?

...

additional arguments to calcBoundaryData() and calcSpeciesAverageInPus().

See also

Examples

# load data data(cs_pus, cs_spp, cs_space) # \dontrun{ # make RapData object using the first 10 planning units in the dat x <- make.RapData(cs_pus[1:10,], cs_spp, cs_space, include.geographic.space = TRUE) # print object print(x)
#> RapData object.
#> Number of planning units: 10
#> Number of species: 4
#> Number of attribute spaces: 2
# }