population# = (initialvalue @ t) - (death rate) + (fecundtity per individual) dt to be able to vary the values of the inputs death rate and fecundity with time using initial value @ t from the previous time step to evaluate the function at the present time step.
On Mon, Aug 11, 2008 at 9:43 AM, Ben Bolker <[EMAIL PROTECTED]> wrote: > stephen sefick <ssefick <at> gmail.com> writes: > >> >> e1 <- function(x,b,t){ >> d<-(x)*(b^t) >> plot(d) >> } >> >> e1(2, 2,seq(from=0, to=6, by=1)) >> >> Is there a way to do this with a change in time. I would like to use >> differential equations. > > I'm not sure what you mean by "do this with a change in time", > but in general for ODEs you should check out lsoda in the odesolve package. > You can also look at the ecology/environment task view. > > Ben Bolker > > ______________________________________________ > 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. > -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis ______________________________________________ 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.