View source: R/source_sink_dynamics.R
| run_source_sink | R Documentation | 
Simulate dynamics of the source and sink populations under Pulliam (1988)'s model
run_source_sink(endtime, init, params)
| endtime | a number to indicate at what timesetp to end the simulation | 
| init | a vector of initial population sizes of the source and sink population | 
| params | a vector of model parameters | 
plot_source_sink()  for plotting the size of the source and sink
population over time
# in this example, source and sink population start at the same size,
# the sink population dies out, but is later replenished by immigration
# from the source patch once all source breeding sites are occupied
run_source_sink(endtime = 50, init = c(n0Source = 100, n0Sink = 100),
params = c(pa = 0.6, pj = 0.15, betaSource = 3, betaSink = 1, NSource = 300))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.