[Pomp-commits] r805 - pkg/pomp/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 9 23:59:28 CET 2013


Author: kingaa
Date: 2013-01-09 23:59:28 +0100 (Wed, 09 Jan 2013)
New Revision: 805

Modified:
   pkg/pomp/R/example.R
Log:
- improved 'pompExample'


Modified: pkg/pomp/R/example.R
===================================================================
--- pkg/pomp/R/example.R	2013-01-09 22:58:23 UTC (rev 804)
+++ pkg/pomp/R/example.R	2013-01-09 22:59:28 UTC (rev 805)
@@ -7,7 +7,8 @@
     avlbl <- gsub("\\.R$","",avlbl)
     cat("available pomp examples:\n",sQuote(avlbl),"\n")
   } else {
-    file <- system.file(file.path("examples",paste(example,".R",sep="")),package="pomp")
+    ex <- as.character(substitute(example))
+    file <- system.file(file.path("examples",paste(ex,".R",sep="")),package="pomp")
     objs <- source(file,local=TRUE)
     cat("newly created pomp objects:\n",objs$value,"\n")
   }



More information about the pomp-commits mailing list