A function to run a territory capacity simulation
sim_terr_cap.Rd
This function can be used to run territory capacity simulaitons, the randomised elements of the program include the generation of random territory sizes for each reach. Secondly on each of these potential territory scenarios, a simulation is carried out to test the effect of different minimum habitat requirements. This helps to provide some idea of the uncertainty that is involved with the generated territory capacity estimates.
Usage
sim_terr_cap(
BeaverNetwork,
n_p_terr_sim = 1,
n_hab_sim = 5,
min_veg = c(1.5, 4),
progbar = TRUE
)
Arguments
- BeaverNetwork
A river network with attributed results from Graham, et al., (2020) or Macfarlane, et al., (2017) An sf object or an sf-readable file. See sf::st_drivers() for available drivers.
- n_p_terr_sim
Numeric denoting the number of random potential territory simulation to undertake.
- n_hab_sim
Numeric which defines the number of minimum habitat quality scenarios to test between the range given in 'min_veg'
- min_veg
Numeric vector of length two which sets the range of minimum habitat values to be tested in the simulation
- progbar
Boolean to use a progress bar to monitor progress
Value
an 'sf' object containing all the results from the simulation. each row is a dissolved geometry of all simulated territories. Additional information for each simulation includes the number of territories, the minimum vegetation value used and the simulation number.
Examples
if (FALSE) {
# --- Subset dataset for example to reduce computation time ---
BeavNetOtter <- RivOtter_BeaverNet[RivOtter_BeaverNet$Str_order > 3,]
# --- run simple simulation...
sim_terr_cap(BeavNetOtter, n_p_terr_sim=2, n_hab_sim=2, min_veg = c(1.3, 1.8))
}