Craig O'Connell <craigpoconnell <at> gmail.com> writes: > I am currently modifying a previously developed predator prey model and > was curious if there was a way to add in a disturbance to the model (let's > say at time t=100). The disturbance can be the introduction of 40 prey > (N=40) and 10 predators (Pred = 10). I would like to see my model go from a > state of equilibrium (up to t = 99), show this disturbance (at t = 100) and > then slowly work its way back to equilibrium. Does anybody know if this > could be done?
library(deSolve) ?events lsoda(..., events=list(data=data.frame(var=c("N","Pred"),time=rep(100,2), value=c(40,10),method=rep("add",2)))) or something like that ... ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.