Beaver territory capacity simulation
territory_cap.Rd
Function to estimate the territory capacity of a catchment for beavers. The potential territories are iteratively compared to select the most suitable habitats that do not intersect. Stream size and habitat quality are prioritised such that terrtories in larger rivers with better habitat are considered more suitable.
Usage
territory_cap(
territories,
min_veg = 2.5,
min_bdc = 1,
progbars = TRUE,
multicore = FALSE,
ncores
)
Arguments
- territories
The potential terrtory areas produced using
beavertools::gen_territories()
- min_veg
Numeric vector describing the minimum vegetation index value which can support a beaver territory.
- min_bdc
Numeric vector describing the minimum Beaver Dam Capacity for reaches where Stream Order <=4.
- multicore
Boolean to multiple core - This function can be slow for large catchments so setting as TRUE can speed things up.
- ncores
numeric denoting the number of processes to run the function across. If not included, defaults to:
parallel::detectCores()[1]-2
- progbar
Boolean to use a progress bar to monitor progress
Value
An 'sf' object containing all viable territories, the total of which equals the territory capacity.
Examples
if (FALSE) {
# --- Subset dataset for example to reduce computation time ---
BeavNetOtter <- RivOtter_BeaverNet[RivOtter_BeaverNet$Str_order > 3,]
# ---------- run terriroty generation --------
poss_terrs <- gen_territories(BeavNetOtter)
# ------------- Run territory cap -------------
territory_cap(poss_terrs, multicore = TRUE)
}