Hi,
yes, the suggestion of Peter Dalgaard is correct, and it can also be
done using the "event" mechanism of deSolve, see:
library("deSolve")
?events
... or the slides from our talk given at useR-2011
http://desolve.r-forge.r-project.org/slides/petz_soet2011.pdf
... or the tutorial from
It's been a while, but I think I have gotten through this sort of situation by
splitting the integration into intervals, i.e., you run from t=0 to t=20 witn
initial condition c(100,0), yielding a value c(y1,y2), then you run from 20 to
40 with initial condition c(y1+100, y2), etc.
-pd
On 08
Hi,
I'm working on a system of 2 differential equations. My initial condition
(t=0) is c(100,0) and i'm using lsoda function (from package deSolve) to
solve it.
My system reprensents the evoution of drug concentration in two
compartments throug time. Problem is I would like to model a repeated
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
error in isoda(y = 1, times = seq(0, 1, by = 0.02), func = e1B, parms
= c(b = 0.9)) :
Model function must return a list
this is the error message I get when I try and paste in the code.
Stephen Sefick
On Mon, Aug 11, 2008 at 1:36 PM, Ben Bolker [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED
thanks
On Mon, Aug 11, 2008 at 2:18 PM, Ben Bolker [EMAIL PROTECTED] wrote:
There was a spurious tilde in the code coming
from my digital signature -- oops. ignore the
tilde in the function:
library(odesolve)
## in general x, b are state and parameter VECTORS
e1B - function(t,x,b) {
There was a spurious tilde in the code coming
from my digital signature -- oops. ignore the
tilde in the function:
library(odesolve)
## in general x, b are state and parameter VECTORS
e1B - function(t,x,b) {
list(x*b^t,NULL)
}
L1 =
Hi,
stephen sefick wrote:
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 am trying to model
a population with an initial value, fecundity per time
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 am trying to model
a population with an initial value, fecundity per time step, and a
death rate. The
On Tue, Jun 17, 2008 at 6:25 PM, David Arnold [EMAIL PROTECTED]
wrote:
All,
I've found odesolve and lsoda.
Any other packages for differential equations?
There's Rsundials, which gives you an algebraic ode solver.
Any good tutorials on using R and solving differential and partial
I just got 37 hits from RSiteSearch('differential equation',
'fun') including odesolv{fda}, rk4{deSolve}, rk4{odesolve}, in addition
to lsoda{odesolve} and the Rsundials package.
hope this helps.
Spencer Graves
Michael Lawrence wrote:
On Tue, Jun 17, 2008 at 6:25 PM, David
All,
I've found odesolve and lsoda.
Any other packages for differential equations?
Any good tutorials on using R and solving differential and partial
differential equations?
D.
__
R-help@r-project.org mailing list
12 matches
Mail list logo