[R-sig-dyn-mod] deSolve warning and error messages

Ogurtsova, Ekaterina Ogurtsova at demogr.mpg.de
Wed Feb 20 11:20:12 CET 2013


Dear Thomas,

Unfortunately,  my R code is quite sophisticated. However, If you insist, I can write down something short and easy (see below). 
But the problem, in the first place, is not that I have warnings. 

For example:

DLSODA-  At current T (=R1), MXSTEP (=I1) steps   
      taken on this call before reaching TOUT     
In above message, I = 
[1] 10
In above message, R = 
[1] 88.8862

And I have an algorithm how handling this situation later in the code.  But I'm annoyed by the messages and just want to suppress them.

---
Here an artificial example just to reproduce a message:

library(deSolve)

lng<-100
times<-seq(1,100, length=lng)
y<-diag(2)

simpleFun<-function(t,y, parms=NULL){
  	p <- array(y,dim=c(2,2))

  	age<-1:101
 	 tab<-cbind(
    		  -seq(0.1,5,length=101)
    		, seq(0.8,0.1, length=101)
    		, seq(0.1,5,length=101)
   		 , -seq(0.8,0.1, length=101)
 	 )
	  i<- max(which(age<=t))

 	 q<-array(tab[i,],dim=c(2,2))
 	 vec<-c(p%*%q)
 	 return(list(vec,NULL))
}

res<-suppressWarnings(
		lsoda(y=diag(2), times=times
     			 , func=simpleFun
    			  , parms=NULL
     			 , maxsteps=10 )
	)

And the output

>DLSODA-  At current T (=R1), MXSTEP (=I1) steps   
>      taken on this call before reaching TOUT     
>In above message, I = 
>[1] 10
>In above message, R = 
>[1] 1.4032
>

Thanks a lot!

-----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 Thomas Petzoldt
Sent: Wednesday, February 20, 2013 9:50 AM
To: r-sig-dynamic-models at r-project.org
Subject: Re: [R-sig-dyn-mod] deSolve warning and error messages

Dear Ekaterina,

thanks for your report, can you please give us a minimal reproducible example?

Thomas Petzoldt

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

----------
This mail has been sent through the MPI for Demographic Research.  Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.



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