[Pomp-commits] r862 - in pkg/pompExamples: . src tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 7 21:41:32 CEST 2013


Author: kingaa
Date: 2013-06-07 21:41:32 +0200 (Fri, 07 Jun 2013)
New Revision: 862

Added:
   pkg/pompExamples/src/Makevars
Modified:
   pkg/pompExamples/DESCRIPTION
   pkg/pompExamples/src/pertussis.c
   pkg/pompExamples/tests/budmoth.Rout.save
   pkg/pompExamples/tests/pertussis.Rout.save
Log:
- update to use new facilities from pomp v 0.45-4


Modified: pkg/pompExamples/DESCRIPTION
===================================================================
--- pkg/pompExamples/DESCRIPTION	2013-06-07 12:27:52 UTC (rev 861)
+++ pkg/pompExamples/DESCRIPTION	2013-06-07 19:41:32 UTC (rev 862)
@@ -1,8 +1,8 @@
 Package: pompExamples
 Type: Package
 Title: Statistical inference for partially observed Markov processes
-Version: 0.21-1
-Date: 2013-04-22
+Version: 0.21-2
+Date: 2013-06-07
 Maintainer: Aaron A. King <kingaa at umich.edu>
 Authors at R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa at umich.edu"),
 	  person(given=c("Edward","L."),family="Ionides",role=c("aut")),
@@ -15,7 +15,7 @@
 	  person(given=c("Helen"),family="Wearing",role=c("ctb")))
 URL: http://pomp.r-forge.r-project.org
 Description: More 'pomp' examples.
-Depends: R(>= 3.0.0), stats, methods, graphics, pomp(>= 0.43-8)
+Depends: R(>= 3.0.0), stats, methods, graphics, pomp(>= 0.45-4)
 License: GPL (>= 2)
 LazyLoad: true
 LazyData: false

Added: pkg/pompExamples/src/Makevars
===================================================================
--- pkg/pompExamples/src/Makevars	                        (rev 0)
+++ pkg/pompExamples/src/Makevars	2013-06-07 19:41:32 UTC (rev 862)
@@ -0,0 +1,2 @@
+POMP_INC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e 'library(pomp); cat(system.file("include",package="pomp"))')
+PKG_CFLAGS = -I $(POMP_INC)

Modified: pkg/pompExamples/src/pertussis.c
===================================================================
--- pkg/pompExamples/src/pertussis.c	2013-06-07 12:27:52 UTC (rev 861)
+++ pkg/pompExamples/src/pertussis.c	2013-06-07 19:41:32 UTC (rev 862)
@@ -2,19 +2,10 @@
 
 #include <R.h>
 #include <Rmath.h>
-#include <Rdefines.h>
+#include <Rinternals.h>
 #include <R_ext/Rdynload.h>
+#include <pomp.h>
 
-inline double expit (double x) {return 1.0/(1.0+exp(-x));}
-
-inline double logit (double p) {return log(p/(1.0-p));}
-
-static inline double rgammawn (double sigma, double dt) {
-  double sigmasq;
-  sigmasq = sigma*sigma;
-  return (sigmasq > 0) ? rgamma(dt/sigmasq,sigmasq) : dt;
-}
-
 static double term_time (double t) {
   double day = 365.0 * (t - floor(t));
   int tt = (day >= 7.0 && day < 100.0) 
@@ -142,9 +133,6 @@
   double beta, alpha3;
   double dW;		// white noise process
   double foi;		// force of infection
-  void (*reulermultinom)(int, double, double *, double, double *);
-
-  reulermultinom = (void (*)(int,double,double*,double,double*)) R_GetCCallable("pomp","reulermultinom");
   
   alpha3 = ALPHA*ALPHA_RATIO;
   beta = MEANBETA*(1+AMPLBETA*term_time(t));

Modified: pkg/pompExamples/tests/budmoth.Rout.save
===================================================================
--- pkg/pompExamples/tests/budmoth.Rout.save	2013-06-07 12:27:52 UTC (rev 861)
+++ pkg/pompExamples/tests/budmoth.Rout.save	2013-06-07 19:41:32 UTC (rev 862)
@@ -1,7 +1,6 @@
 
-R version 2.15.2 (2012-10-26) -- "Trick or Treat"
-Copyright (C) 2012 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
+R version 3.0.1 (2013-05-16) -- "Good Sport"
+Copyright (C) 2013 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -16,8 +15,7 @@
 'help.start()' for an HTML browser interface to help.
 Type 'q()' to quit R.
 
-> require(pompExamples)
-Loading required package: pompExamples
+> library(pompExamples)
 Loading required package: pomp
 Loading required package: mvtnorm
 Loading required package: subplex
@@ -130,4 +128,4 @@
 > 
 > proc.time()
    user  system elapsed 
-  1.284   0.056   1.323 
+  0.604   0.064   0.689 

Modified: pkg/pompExamples/tests/pertussis.Rout.save
===================================================================
--- pkg/pompExamples/tests/pertussis.Rout.save	2013-06-07 12:27:52 UTC (rev 861)
+++ pkg/pompExamples/tests/pertussis.Rout.save	2013-06-07 19:41:32 UTC (rev 862)
@@ -1,7 +1,6 @@
 
-R version 2.15.2 (2012-10-26) -- "Trick or Treat"
-Copyright (C) 2012 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
+R version 3.0.1 (2013-05-16) -- "Good Sport"
+Copyright (C) 2013 The R Foundation for Statistical Computing
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -16,8 +15,7 @@
 'help.start()' for an HTML browser interface to help.
 Type 'q()' to quit R.
 
-> require(pompExamples)
-Loading required package: pompExamples
+> library(pompExamples)
 Loading required package: pomp
 Loading required package: mvtnorm
 Loading required package: subplex
@@ -149,7 +147,7 @@
 > 
 > system.time(pf <- pfilter(pertussis.sim(full.small),seed=3445886L,Np=1000))
    user  system elapsed 
- 65.132   0.216  65.495 
+ 19.717   0.000  19.778 
 > logLik(pf)
 [1] -3829.33
 > 
@@ -173,4 +171,4 @@
 > 
 > proc.time()
    user  system elapsed 
- 66.960   0.264  67.348 
+ 20.497   0.064  20.642 



More information about the pomp-commits mailing list