[Pomp-commits] r267 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 31 21:08:10 CEST 2010


Author: kingaa
Date: 2010-05-31 21:08:09 +0200 (Mon, 31 May 2010)
New Revision: 267

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/nlf.R
   pkg/R/trajectory-pomp.R
Log:
- move deSolve, subplex from Depends to Import


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2010-05-31 18:06:29 UTC (rev 266)
+++ pkg/DESCRIPTION	2010-05-31 19:08:09 UTC (rev 267)
@@ -7,8 +7,8 @@
 Maintainer: Aaron A. King <kingaa at umich.edu>
 URL: http://pomp.r-forge.r-project.org
 Description: Inference methods for partially-observed Markov processes
-Depends: R(>= 2.9.1), stats, methods, graphics, deSolve, subplex
-Imports: mvtnorm
+Depends: R(>= 2.9.1), stats, methods, graphics
+Imports: mvtnorm, subplex, deSolve
 License: GPL(>= 2)
 LazyLoad: true
 LazyData: false

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2010-05-31 18:06:29 UTC (rev 266)
+++ pkg/NAMESPACE	2010-05-31 19:08:09 UTC (rev 267)
@@ -20,6 +20,8 @@
 importFrom(graphics,plot)		
 importFrom(stats,simulate,time,coef,logLik)
 importFrom(mvtnorm,dmvnorm,rmvnorm)
+importFrom(deSolve,lsoda)
+importFrom(subplex,subplex)
 
 exportClasses('pomp','mif')
 

Modified: pkg/R/nlf.R
===================================================================
--- pkg/R/nlf.R	2010-05-31 18:06:29 UTC (rev 266)
+++ pkg/R/nlf.R	2010-05-31 19:08:09 UTC (rev 267)
@@ -84,24 +84,24 @@
   }
 
   if (method == 'subplex') {
-    opt <- subplex(
-                   par=guess,
-                   fn=nlf.objfun,
-                   object=object,
-                   params=params,
-                   par.index=par.index, 
-                   times=times,
-                   lags=lags,
-                   period=period,
-                   tensor=tensor,
-                   seed=seed,
-                   transform=transform,
-                   nrbf=nrbf, 
-                   verbose=verbose,
-                   bootstrap=bootstrap,
-                   bootsamp=bootsamp,
-                   control=list(...)
-                   )
+    opt <- subplex::subplex(
+                            par=guess,
+                            fn=nlf.objfun,
+                            object=object,
+                            params=params,
+                            par.index=par.index, 
+                            times=times,
+                            lags=lags,
+                            period=period,
+                            tensor=tensor,
+                            seed=seed,
+                            transform=transform,
+                            nrbf=nrbf, 
+                            verbose=verbose,
+                            bootstrap=bootstrap,
+                            bootsamp=bootsamp,
+                            control=list(...)
+                            )
   } else {
     opt <- optim(
                  par=guess,

Modified: pkg/R/trajectory-pomp.R
===================================================================
--- pkg/R/trajectory-pomp.R	2010-05-31 18:06:29 UTC (rev 266)
+++ pkg/R/trajectory-pomp.R	2010-05-31 19:08:09 UTC (rev 267)
@@ -55,27 +55,27 @@
                    vectorfield={        # integrate the vectorfield
                      for (j in seq_len(nrep)) {
                        X <- try(
-                                lsoda(
-                                      y=x0[,j],
-                                      times=times,
-                                      func=function(t,y,parms){
-                                        list(
-                                             skeleton(
-                                                      object,
-                                                      x=array(
-                                                        data=y,
-                                                        dim=c(length(y),1,1),
-                                                        dimnames=list(names(y),NULL,NULL)
-                                                        ),
-                                                      t=t,
-                                                      params=as.matrix(parms)
-                                                      ),
-                                             NULL
-                                             )
-                                      },
-                                      parms=params[,j],
-                                      ...
-                                      ),
+                                deSolve::lsoda(
+                                               y=x0[,j],
+                                               times=times,
+                                               func=function(t,y,parms){
+                                                 list(
+                                                      skeleton(
+                                                               object,
+                                                               x=array(
+                                                                 data=y,
+                                                                 dim=c(length(y),1,1),
+                                                                 dimnames=list(names(y),NULL,NULL)
+                                                                 ),
+                                                               t=t,
+                                                               params=as.matrix(parms)
+                                                               ),
+                                                      NULL
+                                                      )
+                                               },
+                                               parms=params[,j],
+                                               ...
+                                               ),
                                 silent=FALSE
                                 )
                        if (inherits(X,'try-error'))



More information about the pomp-commits mailing list