[R-sig-dyn-mod] eventfunc environment

Karline Soetaert Karline.Soetaert at nioz.nl
Thu Apr 10 14:19:33 CEST 2014


Gianmarco,

I am afraid it is not possible to access the indroot vector from within the event function, so you will need to do this in your 'unelegant' way. alternatively you might use a 'global' variable, but this is not elegant either. 

Karline

-----Original Message-----
From: r-sig-dynamic-models-bounces at r-project.org [mailto:r-sig-dynamic-models-bounces at r-project.org] On Behalf Of Gianmarco Polotti
Sent: donderdag 10 april 2014 12:10
To: r-sig-dynamic-models at r-project.org
Subject: [R-sig-dyn-mod] eventfunc environment

I use deSolve for a DAEs problem. The number of equations changes dependending of some conditions find by the rootfunc routine. I find very useful the use of the event function.
I need to know inside the eventfunc which root equation is satisfied, i.e.
basically the indroot vector.  However, it seems it is not accessible inside this function. How can I read it ?
At the moment, I solve my problem calling again the rootfunc inside the eventfunc and I rebuilt the indroot content. But this is a quite unelegant solution.

Thanks in advance for the help.

Gianmarco

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-dynamic-models mailing list
R-sig-dynamic-models at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models



More information about the R-sig-dynamic-models mailing list