[Pomp-commits] r1047 - in pkg/pomp: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 7 11:54:30 CET 2015
Author: kingaa
Date: 2015-01-07 11:54:29 +0100 (Wed, 07 Jan 2015)
New Revision: 1047
Modified:
pkg/pomp/DESCRIPTION
pkg/pomp/R/builder.R
pkg/pomp/R/pomp.R
pkg/pomp/inst/NEWS
pkg/pomp/inst/NEWS.Rd
pkg/pomp/man/pomp.Rd
Log:
- compiler messages are now suppressed by default
- pomp, pompCBuilder, pompLoad, and pompUnload all have new 'verbose' option
Modified: pkg/pomp/DESCRIPTION
===================================================================
--- pkg/pomp/DESCRIPTION 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/DESCRIPTION 2015-01-07 10:54:29 UTC (rev 1047)
@@ -1,8 +1,8 @@
Package: pomp
Type: Package
Title: Statistical Inference for Partially Observed Markov Processes
-Version: 0.58-1
-Date: 2015-01-06
+Version: 0.58-2
+Date: 2015-01-07
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")),
Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/R/builder.R 2015-01-07 10:54:29 UTC (rev 1047)
@@ -79,20 +79,34 @@
)
}
+pompLoad.internal <- function (object, ...,
+ verbose = getOption("verbose",FALSE)) {
+ for (lib in object at solibfile) {
+ if (verbose) cat("loading",sQuote(lib),"\n")
+ dyn.load(lib)
+ }
+ invisible(NULL)
+}
+
+pompUnload.internal <- function (object, ...,
+ verbose = getOption("verbose",FALSE)) {
+ for (lib in object at solibfile) {
+ if (verbose) cat("unloading",sQuote(lib),"\n")
+ dyn.unload(lib)
+ }
+ invisible(NULL)
+}
+
setMethod("pompLoad",
signature=signature(object='pomp'),
- definition = function (object) {
- for (lib in object at solibfile)
- dyn.load(lib)
- invisible(NULL)
+ definition = function (object, ...) {
+ pompLoad.internal(object,...)
})
setMethod("pompUnload",
signature=signature(object='pomp'),
- definition = function (object) {
- for (lib in object at solibfile)
- dyn.unload(lib)
- invisible(NULL)
+ definition = function (object, ...) {
+ pompUnload.internal(object,...)
})
define <- list(
@@ -161,7 +175,8 @@
pompCBuilder <- function (name, statenames, paramnames, covarnames, obsnames,
rmeasure, dmeasure, step.fn, skeleton,
parameter.transform, parameter.inv.transform,
- rprior, dprior, globals, save = FALSE, link = TRUE)
+ rprior, dprior, globals, save = FALSE, link = TRUE,
+ verbose = getOption("verbose",FALSE))
{
if (missing(name))
@@ -297,11 +312,12 @@
rv <- system2(
command=R.home("bin/R"),
args=c("CMD","SHLIB","-o",solib,modelfile),
- env=cflags
+ env=cflags,
+ stdout=if (verbose) "" else NULL
)
if (rv!=0)
stop("cannot compile shared-object library ",sQuote(solib))
- else
+ else if (verbose)
cat("model codes written to",sQuote(modelfile),
"\nlink to shared-object library",sQuote(solib),"\n")
Modified: pkg/pomp/R/pomp.R
===================================================================
--- pkg/pomp/R/pomp.R 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/R/pomp.R 2015-01-07 10:54:29 UTC (rev 1047)
@@ -9,7 +9,8 @@
obsnames, statenames, paramnames, covarnames,
zeronames, PACKAGE,
parameter.transform, parameter.inv.transform,
- globals, userdata, ..., .solibfile) {
+ globals, userdata, ..., .solibfile,
+ verbose = getOption("verbose",FALSE)) {
## preliminary error checking
if (missing(data)) stop(sQuote("data")," is a required argument")
@@ -144,7 +145,8 @@
covarnames=covarnames,
globals=globals,
link=TRUE,
- save=FALSE
+ save=FALSE,
+ verbose=verbose
),
snips
)
Modified: pkg/pomp/inst/NEWS
===================================================================
--- pkg/pomp/inst/NEWS 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/inst/NEWS 2015-01-07 10:54:29 UTC (rev 1047)
@@ -2,6 +2,12 @@
_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_8-_1:
+ • Compiler messages are now suppressed by default when
+ ‘Csnippet’s are used in construction of a ‘pomp’ object.
+ These can be enabled by setting ‘options(verbose=TRUE)’.
+
+_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _0._5_8-_1:
+
• A ‘pomp’ object created with ‘Csnippet’s or ‘pompBuilder’
will now remember its associated shared-object file, which
can be unloaded and reloaded using the new ‘pompUnload’ and
Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/inst/NEWS.Rd 2015-01-07 10:54:29 UTC (rev 1047)
@@ -2,6 +2,12 @@
\title{News for package `pomp'}
\section{Changes in \pkg{pomp} version 0.58-1}{
\itemize{
+ \item Compiler messages are now suppressed by default when \code{Csnippet}s are used in construction of a \code{pomp} object.
+ These can be enabled by setting \code{options(verbose=TRUE)}.
+ }
+}
+\section{Changes in \pkg{pomp} version 0.58-1}{
+ \itemize{
\item A \code{pomp} object created with \code{Csnippet}s or \code{pompBuilder} will now remember its associated shared-object file, which can be unloaded and reloaded using the new \code{pompUnload} and \code{pompLoad} methods.
}
}
Modified: pkg/pomp/man/pomp.Rd
===================================================================
--- pkg/pomp/man/pomp.Rd 2015-01-07 03:26:44 UTC (rev 1046)
+++ pkg/pomp/man/pomp.Rd 2015-01-07 10:54:29 UTC (rev 1047)
@@ -44,8 +44,8 @@
initializer, rprior, dprior, params, covar, tcovar,
obsnames, statenames, paramnames, covarnames, zeronames,
PACKAGE, parameter.transform, parameter.inv.transform, globals)
-\S4method{pompLoad}{pomp}(object)
-\S4method{pompUnload}{pomp}(object)
+\S4method{pompLoad}{pomp}(object, \dots)
+\S4method{pompUnload}{pomp}(object, \dots)
}
\arguments{
\item{data, times}{
More information about the pomp-commits
mailing list