# Create a scenario with background mortality only
scen1 <- minnow_it %>%
set_noexposure() %>%
set_times(0:10)
# Modify a scenario parameter, e.g. set background mortality to zero
scen2 <- scen1 %>% set_param(c(hb=0))
# Create a sequence of scenarios, scenario #1 will be simulated for the
# time period [0, 4], and #2 for [4, 10]
sq <- sequence(list(scen1, scen2), breaks=c(4))
# Simulate the sequence: the mortality stops after t=4.0, due to scenario #2
# being simulated after t=4.0, which disabled the background mortality
simulate(sq)
Run the code above in your browser using DataLab