load_scenario.Rd
Modify baseline model inputs based on a set of actions
load_scenario(
scenario,
params = fallRunDSM::r_to_r_baseline_params,
species = c("fr", "wr", "sr", "st", "lfr"),
spawn_decay_rate = fallRunDSM::r_to_r_baseline_params$spawn_decay_rate,
rear_decay_rate = fallRunDSM::r_to_r_baseline_params$rear_decay_rate,
spawn_decay_multiplier = fallRunDSM::r_to_r_baseline_params$spawn_decay_multiplier
)
a list containing scenario information, see details below
Lifecycle model"params" data object. See the example for more details.
provide "fr"
, "lfr"
, "wr"
, "sr"
, or "st"
for fall run, late-fall run,
winter run, spring run, or steelhead respectively to designate which params
data object
to be modified. For example, supply "fr"
if running the fallRunDSM::fall_run_model
.
length 31 vector of 1 - spawning decay rate estimates
length 31 vector of 1 - rearing decay rate estimates
boolean, TRUE for creating scenarios with stochasticity
A scenario is a list of 31 by 20 matrices with each value representing the units of effort to apply in a tributarty in a given year for a action type.
The scenario list should be formatted like this:
list(spawn = matrix(), inchannel = matrix(), floodplain = matrix(), survival = matrix())
A scenario can also include a boolean vector named no_decay
if the user
desires to exclude a watershed from spawning and rearing habitat decay.
scenario_df <- data.frame(watershed = rep("All", 5),
action = c(2, 14, 16, 18, 21),
years = rep("All", 5))
custom_scenario <- get_action_matrices()
#> Error in get_action_matrices(): could not find function "get_action_matrices"
params <- fallRunDSM::r_to_r_baseline_params
scenario_custom <- load_scenario(scenario = custom_scenario,
species = R2Rscenario::species$FALL_RUN,
params = params)
#> Error: object 'custom_scenario' not found