Learn R Programming

raptr (version 0.0.1)

make.RapData: Make data for RAP using minimal inputs

Description

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

Usage

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 * cellStats(species, "sum")), include.geographic.space = TRUE, scale = TRUE, verbose = FALSE, ...)

Arguments

pus
SpatialPolygons with planning unit data.
species
RasterLayer, RasterStack, RasterBrick with species probability distribution data.
spaces
list of/or RasterLayer, RasterStack, RasterBrick 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 0 then demand points are generated across the full range of values the species.points intersect. Defaults to 0.5.
species.points
list of/or SpatialPointsDataFrame or 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 specifiying 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 calcPuVsSpeciesData.

See Also

RapData-class, RapData.

Examples

Run this code
## Not run: 
# # load data
# data(cs_pus, cs_spp, cs_space)
# # make RapData object using the 1st 10 planning units
# x <- make.RapData(cs_pus[1:10,], cs_spp, cs_space, include.geographic.space=TRUE)
# print(x)
# ## End(Not run)

Run the code above in your browser using DataLab