[Pomp-commits] r550 - in pkg: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 31 03:20:43 CEST 2011


Author: kingaa
Date: 2011-08-31 03:20:43 +0200 (Wed, 31 Aug 2011)
New Revision: 550

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/mif.R
   pkg/R/profile-design.R
   pkg/inst/NEWS
   pkg/man/profile-design.Rd
Log:

- replace 'profile.design' by 'profileDesign' to eliminate warnings during package check ('profile.design' is mistaken for an undocumented S3 method).  The former is now deprecated.


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/DESCRIPTION	2011-08-31 01:20:43 UTC (rev 550)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Statistical inference for partially observed Markov processes
 Version: 0.39-2
-Date: 2011-08-29
+Date: 2011-08-31
 Author: Aaron A. King, Edward L. Ionides, Carles Breto, Steve Ellner, Bruce Kendall, Helen Wearing, Matthew J. Ferrari, Michael Lavine, Daniel C. Reuman
 Maintainer: Aaron A. King <kingaa at umich.edu>
 URL: http://pomp.r-forge.r-project.org

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/NAMESPACE	2011-08-31 01:20:43 UTC (rev 550)
@@ -68,6 +68,7 @@
        sobol,
        sobol.design,
        slice.design,
+       profileDesign,
        profile.design,
        bspline.basis,
        periodic.bspline.basis,

Modified: pkg/R/mif.R
===================================================================
--- pkg/R/mif.R	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/R/mif.R	2011-08-31 01:20:43 UTC (rev 550)
@@ -507,7 +507,7 @@
           }
           )
 
-mif.profile.design <- function (object, profile, lower, upper, nprof, ivps, 
+mif.profileDesign <- function (object, profile, lower, upper, nprof, ivps, 
                                 rw.sd, Np, ic.lag, var.factor, cooling.factor, ...)
   {
     if (missing(profile)) profile <- list()
@@ -519,7 +519,7 @@
     if (missing(ivps)) ivps <- character(0)
     Np <- as.integer(Np)
 
-    pd <- do.call(profile.design,c(profile,list(lower=lower,upper=upper,nprof=nprof)))
+    pd <- do.call(profileDesign,c(profile,list(lower=lower,upper=upper,nprof=nprof)))
 
     object <- as(object,"pomp")
 

Modified: pkg/R/profile-design.R
===================================================================
--- pkg/R/profile-design.R	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/R/profile-design.R	2011-08-31 01:20:43 UTC (rev 550)
@@ -1,11 +1,16 @@
 profile.design <- function (..., lower, upper, nprof) {
+  .Deprecated(new="profileDesign",package="pomp")
+  profileDesign(...,lower,upper,nprof)
+}
+
+profileDesign <- function (..., lower, upper, nprof) {
   prof <- list(...)
   pvars <- names(prof)
   if (any(pvars==""))
-    stop(sQuote("profile.design"),": you cannot profile over an unnamed variable!")
+    stop(sQuote("profileDesign"),": you cannot profile over an unnamed variable!")
   ovars <- names(lower)
   if (!all(sort(ovars)==sort(names(upper))))
-    stop(sQuote("profile.design"),": names of ",sQuote("lower")," and ",sQuote("upper")," must match!")
+    stop(sQuote("profileDesign"),": names of ",sQuote("lower")," and ",sQuote("upper")," must match!")
   vars <- ovars[!(ovars%in%pvars)]
   x <- as.matrix(expand.grid(...))
   y <- as.matrix(sobol.design(lower=lower,upper=upper,nseq=nprof))

Modified: pkg/inst/NEWS
===================================================================
--- pkg/inst/NEWS	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/inst/NEWS	2011-08-31 01:20:43 UTC (rev 550)
@@ -5,6 +5,9 @@
 
      o	Bug fix: when 'pfilter' is called with a single parameter vector supplied in the 'params' argument, these parameters are copied into the 'params' slot of the resulting 'pfilterd.pomp' object.
 
+     o	To eliminate warnings and confusion during package check, 'profile.design' has been replaced by 'profileDesign'.
+     	The former is now deprecated and will be removed in a future release.
+
 0.39-1
      o	New facilities for parameter transformation are provided.
      	New optional arguments 'parameter.transform' and 'parameter.inv.transform' to 'pomp' allow the user to specify transformations between natural and internal parameter scalings.

Modified: pkg/man/profile-design.Rd
===================================================================
--- pkg/man/profile-design.Rd	2011-08-30 22:15:28 UTC (rev 549)
+++ pkg/man/profile-design.Rd	2011-08-31 01:20:43 UTC (rev 550)
@@ -1,10 +1,12 @@
-\name{profile.design}
+\name{profileDesign}
+\alias{profileDesign}
 \alias{profile.design}
 \title{Design matrices for likelihood profile calculations.}
 \description{
-  \code{profile.design} generates a data-frame where each row can be used as the starting point for a profile likelihood calculation.
+  \code{profileDesign} generates a data-frame where each row can be used as the starting point for a profile likelihood calculation.
 }
 \usage{
+profileDesign(\dots, lower, upper, nprof)
 profile.design(\dots, lower, upper, nprof)
 }
 \arguments{
@@ -19,18 +21,19 @@
   }
 }
 \value{
-  \code{profile.design} returns a data frame with \code{nprof} points per profile point.
+  \code{profileDesign} returns a data frame with \code{nprof} points per profile point.
   The other parameters in \code{vars} are sampled using \code{sobol}.
+  The second form (\code{profile.design}) is now deprecated.
 }
 \seealso{\code{\link{sobol}}}
 \author{Aaron A. King \email{kingaa at umich dot edu}}
 \examples{
 ## A one-parameter profile design:
-x <- profile.design(p=1:10,lower=c(a=0,b=0),upper=c(a=1,b=5),nprof=20)
+x <- profileDesign(p=1:10,lower=c(a=0,b=0),upper=c(a=1,b=5),nprof=20)
 dim(x)
 plot(x)
 ## A two-parameter profile design:
-x <- profile.design(p=1:10,q=3:5,lower=c(a=0,b=0),upper=c(b=5,a=1),nprof=20)
+x <- profileDesign(p=1:10,q=3:5,lower=c(a=0,b=0),upper=c(b=5,a=1),nprof=20)
 dim(x)
 plot(x)
 }



More information about the pomp-commits mailing list