From 7bda0be7cb6a33f76feda0cdb01dcd9dca93aa1c Mon Sep 17 00:00:00 2001 From: "Aaron A. King" Date: Thu, 2 May 2024 07:36:18 -0400 Subject: [PATCH] remove defunct functions --- DESCRIPTION | 5 +- NAMESPACE | 22 ------ R/defunct.R | 166 ---------------------------------------- R/mif2.R | 6 +- R/pfilter.R | 2 +- inst/NEWS | 5 ++ inst/NEWS.Rd | 5 ++ man/mif2.Rd | 6 +- man/pfilter.Rd | 2 +- man/pomp-defunct.Rd | 79 ------------------- tests/defunct.R | 24 ------ tests/defunct.Rout.save | 110 -------------------------- 12 files changed, 20 insertions(+), 412 deletions(-) delete mode 100644 R/defunct.R delete mode 100644 man/pomp-defunct.Rd delete mode 100644 tests/defunct.R delete mode 100644 tests/defunct.Rout.save diff --git a/DESCRIPTION b/DESCRIPTION index 09af8883..f821f17d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: pomp Type: Package Title: Statistical Inference for Partially Observed Markov Processes -Version: 5.8.0.0 -Date: 2024-05-01 +Version: 5.8.1.0 +Date: 2024-05-02 Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa@umich.edu",comment=c(ORCID="0000-0001-6159-3207")), person(given=c("Edward","L."),family="Ionides",role="aut",comment=c(ORCID="0000-0002-4190-0174")) , person(given="Carles",family="Bretó",role="aut",comment=c(ORCID="0000-0003-4695-4902")), @@ -86,7 +86,6 @@ Collate: 'cond_logLik.R' 'covmat.R' 'dacca.R' - 'defunct.R' 'design.R' 'ebola.R' 'eff_sample_size.R' diff --git a/NAMESPACE b/NAMESPACE index 36c2d6ec..78a2dc1f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,22 +14,18 @@ S3method(as.data.frame,probed_pomp) S3method(as.data.frame,wpfilterd_pomp) S3method(c,Pomp) export(Csnippet) -export(as.pomp) export(as_pomp) export(bake) export(blowflies1) export(blowflies2) -export(bspline.basis) export(bspline_basis) export(concat) -export(cond.logLik) export(continue) export(dacca) export(dbetabinom) export(deulermultinom) export(discrete_time) export(ebolaModel) -export(eff.sample.size) export(euler) export(expit) export(freeze) @@ -46,30 +42,14 @@ export(logmeanexp) export(lookup) export(map) export(mcap) -export(mvn.diag.rw) -export(mvn.rw) -export(mvn.rw.adaptive) export(mvn_diag_rw) export(mvn_rw) export(mvn_rw_adaptive) export(onestep) export(ou2) export(parameter_trans) -export(periodic.bspline.basis) export(periodic_bspline_basis) export(pomp) -export(pred.mean) -export(pred.var) -export(probe.acf) -export(probe.ccf) -export(probe.marginal) -export(probe.mean) -export(probe.median) -export(probe.nlar) -export(probe.period) -export(probe.quantile) -export(probe.sd) -export(probe.var) export(probe_acf) export(probe_ccf) export(probe_marginal) @@ -86,11 +66,9 @@ export(reulermultinom) export(rgammawn) export(ricker) export(runif_design) -export(rw.sd) export(rw2) export(rw_sd) export(sannbox) -export(saved.states) export(sir) export(sir2) export(slice_design) diff --git a/R/defunct.R b/R/defunct.R deleted file mode 100644 index da570968..00000000 --- a/R/defunct.R +++ /dev/null @@ -1,166 +0,0 @@ -##' Defunct functions -##' -##' These functions are defunct and will be expunged in a future release. -##' -##' @name defunct -##' @rdname pomp-defunct -##' @keywords internal -##' @include package.R -##' @param ... all arguments are ignored. -##' -NULL - -##' @rdname pomp-defunct -##' @aliases as.pomp -##' @export -as.pomp <- function (...) { - .Defunct("as_pomp") -} - -##' @rdname pomp-defunct -##' @aliases bspline.basis -##' @export -bspline.basis <- function (...) { - .Defunct("bspline_basis") -} - -##' @rdname pomp-defunct -##' @aliases cond.logLik -##' @export -cond.logLik <- function (...) { - .Defunct("cond_logLik") -} - -##' @rdname pomp-defunct -##' @aliases eff.sample.size -##' @export -eff.sample.size <- function (...) { - .Defunct("eff_sample_size") -} - -##' @rdname pomp-defunct -##' @aliases mvn.diag.rw -##' @export -mvn.diag.rw <- function (...) { - .Defunct("mvn_diag_rw") -} - -##' @rdname pomp-defunct -##' @aliases mvn.rw -##' @export -mvn.rw <- function (...) { - .Defunct("mvn_rw") -} - -##' @rdname pomp-defunct -##' @aliases mvn.rw.adaptive -##' @export -mvn.rw.adaptive <- function (...) { - .Defunct("mvn_rw_adaptive") -} - -##' @rdname pomp-defunct -##' @aliases periodic.bspline.basis -##' @export -periodic.bspline.basis <- function (...) { - .Defunct("periodic_bspline_basis") -} - -##' @rdname pomp-defunct -##' @aliases pred.mean -##' @export -pred.mean <- function (...) { - .Defunct("pred_mean") -} - -##' @rdname pomp-defunct -##' @aliases pred.var -##' @export -pred.var <- function (...) { - .Defunct("pred_var") -} - -##' @rdname pomp-defunct -##' @aliases probe.acf -##' @export -probe.acf <- function (...) { - .Defunct("probe_acf") -} - -##' @rdname pomp-defunct -##' @aliases probe.ccf -##' @export -probe.ccf <- function (...) { - .Defunct("probe_ccf") -} - -##' @rdname pomp-defunct -##' @aliases probe.marginal -##' @export -probe.marginal <- function (...) { - .Defunct("probe_marginal") -} - -##' @rdname pomp-defunct -##' @aliases probe.mean -##' @export -probe.mean <- function (...) { - .Defunct("probe_mean") -} - -##' @rdname pomp-defunct -##' @aliases probe.median -##' @export -probe.median <- function (...) { - .Defunct("probe_median") -} - -##' @rdname pomp-defunct -##' @aliases probe.nlar -##' @export -probe.nlar <- function (...) { - .Defunct("probe_nlar") -} - -##' @rdname pomp-defunct -##' @aliases probe.period -##' @export -probe.period <- function (...) { - .Defunct("probe_period") -} - -##' @rdname pomp-defunct -##' @aliases probe.quantile -##' @export -probe.quantile <- function (...) { - .Defunct("probe_quantile") -} - -##' @rdname pomp-defunct -##' @aliases probe.sd -##' @export -probe.sd <- function (...) { - .Defunct("probe_sd") -} - -##' @rdname pomp-defunct -##' @aliases probe.var -##' @export -probe.var <- function (...) { - .Defunct("probe_var") -} - -##' @rdname pomp-defunct -##' @aliases rw.sd -##' @export -rw.sd <- function (...) { - .Defunct("rw_sd") -} - -##' @rdname pomp-defunct -##' @aliases saved.states -##' @export -saved.states <- function (...) { - .Defunct("saved_states") -} - diff --git a/R/mif2.R b/R/mif2.R index 1f7135f5..b81c9bf6 100644 --- a/R/mif2.R +++ b/R/mif2.R @@ -22,7 +22,7 @@ ##' @param Nmif The number of filtering iterations to perform. ##' @param rw.sd specification of the magnitude of the random-walk perturbations that will be applied to some or all model parameters. ##' Parameters that are to be estimated should have positive perturbations specified here. -##' The specification is given using the \code{\link{rw.sd}} function, which creates a list of unevaluated expressions. +##' The specification is given using the \code{\link{rw_sd}} function, which creates a list of unevaluated expressions. ##' The latter are evaluated in a context where the model time variable is defined (as \code{time}). ##' The expression \code{ivp(s)} can be used in this context as shorthand for \preformatted{ifelse(time==time[1],s,0).} ##' Likewise, \code{ivp(s,lag)} is equivalent to \preformatted{ifelse(time==time[lag],s,0).} @@ -50,12 +50,12 @@ ##' \item{\code{\link{logLik}}}{ returns the so-called \dfn{mif log likelihood} which is the log likelihood of the perturbed model, not of the focal model itself. ##' To obtain the latter, it is advisable to run several \code{\link{pfilter}} operations on the result of a \code{mif2} computatation.} ##' \item{\code{\link{coef}}}{ extracts the point estimate } -##' \item{\code{\link{eff.sample.size}}}{ extracts the effective sample size of the final filtering iteration} +##' \item{\code{\link{eff_sample_size}}}{ extracts the effective sample size of the final filtering iteration} ##' } ##' Various other methods can be applied, including all the methods applicable to a \code{\link[=pfilter]{pfilterd_pomp}} object and all other \pkg{pomp} estimation algorithms and diagnostic methods. ##' ##' @section Specifying the perturbations: -##' The \code{rw.sd} function simply returns a list containing its arguments as unevaluated expressions. +##' The \code{rw_sd} function simply returns a list containing its arguments as unevaluated expressions. ##' These are then evaluated in a context containing the model \code{time} variable. ##' This allows for easy specification of the structure of the perturbations that are to be applied. ##' For example, diff --git a/R/pfilter.R b/R/pfilter.R index f224f9ba..94dddcc6 100644 --- a/R/pfilter.R +++ b/R/pfilter.R @@ -37,7 +37,7 @@ ##' If \code{save.states="weighted"}, the state-vector for each weighted particle at each time is saved, along with the corresponding weight. ##' If \code{save.states="no"}, information on the latent states is not saved. ##' \code{"FALSE"} is a synonym for \code{"no"} and \code{"TRUE"} is a synonym for \code{"unweighted"}. -##' To retrieve the saved states, applying \code{\link{saved.states}} to the result of the \code{pfilter} computation. +##' To retrieve the saved states, applying \code{\link{saved_states}} to the result of the \code{pfilter} computation. ##' ##' @return ##' An object of class \sQuote{pfilterd_pomp}, which extends class \sQuote{pomp}. diff --git a/inst/NEWS b/inst/NEWS index 820306cf..26ea0370 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,5 +1,10 @@ _N_e_w_s _f_o_r _p_a_c_k_a_g_e '_p_o_m_p' +_C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _5._8._1: + + • Functions with names that include dots (‘.’), which have been + defunct since version 4.7, have been expunged. + _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _5._7._1: • The ‘err()’ and ‘warn()’ C-level macros have been redefined diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 0c054aae..c11d6d51 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -1,5 +1,10 @@ \name{NEWS} \title{News for package `pomp'} +\section{Changes in \pkg{pomp} version 5.8.1}{ + \itemize{ + \item Functions with names that include dots (\code{.}), which have been defunct since version 4.7, have been expunged. + } +} \section{Changes in \pkg{pomp} version 5.7.1}{ \itemize{ \item The \code{err()} and \code{warn()} C-level macros have been redefined to forestall problems that would arise when these macros are included in C++ code under forthcoming versions of \R. diff --git a/man/mif2.Rd b/man/mif2.Rd index ca2431c8..9ee91405 100644 --- a/man/mif2.Rd +++ b/man/mif2.Rd @@ -59,7 +59,7 @@ Internally, \code{data} will be coerced to an array with storage-mode \code{doub \item{rw.sd}{specification of the magnitude of the random-walk perturbations that will be applied to some or all model parameters. Parameters that are to be estimated should have positive perturbations specified here. -The specification is given using the \code{\link{rw.sd}} function, which creates a list of unevaluated expressions. +The specification is given using the \code{\link{rw_sd}} function, which creates a list of unevaluated expressions. The latter are evaluated in a context where the model time variable is defined (as \code{time}). The expression \code{ivp(s)} can be used in this context as shorthand for \preformatted{ifelse(time==time[1],s,0).} Likewise, \code{ivp(s,lag)} is equivalent to \preformatted{ifelse(time==time[lag],s,0).} @@ -141,14 +141,14 @@ The following methods are available for such an object: \item{\code{\link{logLik}}}{ returns the so-called \dfn{mif log likelihood} which is the log likelihood of the perturbed model, not of the focal model itself. To obtain the latter, it is advisable to run several \code{\link{pfilter}} operations on the result of a \code{mif2} computatation.} \item{\code{\link{coef}}}{ extracts the point estimate } -\item{\code{\link{eff.sample.size}}}{ extracts the effective sample size of the final filtering iteration} +\item{\code{\link{eff_sample_size}}}{ extracts the effective sample size of the final filtering iteration} } Various other methods can be applied, including all the methods applicable to a \code{\link[=pfilter]{pfilterd_pomp}} object and all other \pkg{pomp} estimation algorithms and diagnostic methods. } \section{Specifying the perturbations}{ -The \code{rw.sd} function simply returns a list containing its arguments as unevaluated expressions. +The \code{rw_sd} function simply returns a list containing its arguments as unevaluated expressions. These are then evaluated in a context containing the model \code{time} variable. This allows for easy specification of the structure of the perturbations that are to be applied. For example, diff --git a/man/pfilter.Rd b/man/pfilter.Rd index 8667f2ed..736ae067 100644 --- a/man/pfilter.Rd +++ b/man/pfilter.Rd @@ -87,7 +87,7 @@ If \code{save.states="unweighted"}, the state-vector for each unweighted particl If \code{save.states="weighted"}, the state-vector for each weighted particle at each time is saved, along with the corresponding weight. If \code{save.states="no"}, information on the latent states is not saved. \code{"FALSE"} is a synonym for \code{"no"} and \code{"TRUE"} is a synonym for \code{"unweighted"}. -To retrieve the saved states, applying \code{\link{saved.states}} to the result of the \code{pfilter} computation.} +To retrieve the saved states, applying \code{\link{saved_states}} to the result of the \code{pfilter} computation.} \item{...}{additional arguments supply new or modify existing model characteristics or components. See \code{\link{pomp}} for a full list of recognized arguments. diff --git a/man/pomp-defunct.Rd b/man/pomp-defunct.Rd deleted file mode 100644 index d76e360f..00000000 --- a/man/pomp-defunct.Rd +++ /dev/null @@ -1,79 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/defunct.R -\name{defunct} -\alias{defunct} -\alias{as.pomp} -\alias{bspline.basis} -\alias{cond.logLik} -\alias{eff.sample.size} -\alias{mvn.diag.rw} -\alias{mvn.rw} -\alias{mvn.rw.adaptive} -\alias{periodic.bspline.basis} -\alias{pred.mean} -\alias{pred.var} -\alias{probe.acf} -\alias{probe.ccf} -\alias{probe.marginal} -\alias{probe.mean} -\alias{probe.median} -\alias{probe.nlar} -\alias{probe.period} -\alias{probe.quantile} -\alias{probe.sd} -\alias{probe.var} -\alias{rw.sd} -\alias{saved.states} -\title{Defunct functions} -\usage{ -as.pomp(...) - -bspline.basis(...) - -cond.logLik(...) - -eff.sample.size(...) - -mvn.diag.rw(...) - -mvn.rw(...) - -mvn.rw.adaptive(...) - -periodic.bspline.basis(...) - -pred.mean(...) - -pred.var(...) - -probe.acf(...) - -probe.ccf(...) - -probe.marginal(...) - -probe.mean(...) - -probe.median(...) - -probe.nlar(...) - -probe.period(...) - -probe.quantile(...) - -probe.sd(...) - -probe.var(...) - -rw.sd(...) - -saved.states(...) -} -\arguments{ -\item{...}{all arguments are ignored.} -} -\description{ -These functions are defunct and will be expunged in a future release. -} -\keyword{internal} diff --git a/tests/defunct.R b/tests/defunct.R deleted file mode 100644 index afc85189..00000000 --- a/tests/defunct.R +++ /dev/null @@ -1,24 +0,0 @@ -library(pomp) - -try(as.pomp()) -try(bspline.basis()) -try(cond.logLik()) -try(eff.sample.size()) -try(mvn.diag.rw()) -try(mvn.rw()) -try(mvn.rw.adaptive()) -try(periodic.bspline.basis()) -try(pred.mean()) -try(pred.var()) -try(probe.acf()) -try(probe.ccf()) -try(probe.marginal()) -try(probe.mean()) -try(probe.median()) -try(probe.nlar()) -try(probe.period()) -try(probe.quantile()) -try(probe.sd()) -try(probe.var()) -try(rw.sd()) -try(saved.states()) diff --git a/tests/defunct.Rout.save b/tests/defunct.Rout.save deleted file mode 100644 index 850ccaed..00000000 --- a/tests/defunct.Rout.save +++ /dev/null @@ -1,110 +0,0 @@ - -R version 4.4.0 (2024-04-24) -- "Puppy Cup" -Copyright (C) 2024 The R Foundation for Statistical Computing -Platform: x86_64-pc-linux-gnu - -R is free software and comes with ABSOLUTELY NO WARRANTY. -You are welcome to redistribute it under certain conditions. -Type 'license()' or 'licence()' for distribution details. - - Natural language support but running in an English locale - -R is a collaborative project with many contributors. -Type 'contributors()' for more information and -'citation()' on how to cite R or R packages in publications. - -Type 'demo()' for some demos, 'help()' for on-line help, or -'help.start()' for an HTML browser interface to help. -Type 'q()' to quit R. - -> library(pomp) -> -> try(as.pomp()) -Error in as.pomp() : 'as.pomp' is defunct. -Use 'as_pomp' instead. -See help("Defunct") -> try(bspline.basis()) -Error in bspline.basis() : 'bspline.basis' is defunct. -Use 'bspline_basis' instead. -See help("Defunct") -> try(cond.logLik()) -Error in cond.logLik() : 'cond.logLik' is defunct. -Use 'cond_logLik' instead. -See help("Defunct") -> try(eff.sample.size()) -Error in eff.sample.size() : 'eff.sample.size' is defunct. -Use 'eff_sample_size' instead. -See help("Defunct") -> try(mvn.diag.rw()) -Error in mvn.diag.rw() : 'mvn.diag.rw' is defunct. -Use 'mvn_diag_rw' instead. -See help("Defunct") -> try(mvn.rw()) -Error in mvn.rw() : 'mvn.rw' is defunct. -Use 'mvn_rw' instead. -See help("Defunct") -> try(mvn.rw.adaptive()) -Error in mvn.rw.adaptive() : 'mvn.rw.adaptive' is defunct. -Use 'mvn_rw_adaptive' instead. -See help("Defunct") -> try(periodic.bspline.basis()) -Error in periodic.bspline.basis() : 'periodic.bspline.basis' is defunct. -Use 'periodic_bspline_basis' instead. -See help("Defunct") -> try(pred.mean()) -Error in pred.mean() : 'pred.mean' is defunct. -Use 'pred_mean' instead. -See help("Defunct") -> try(pred.var()) -Error in pred.var() : 'pred.var' is defunct. -Use 'pred_var' instead. -See help("Defunct") -> try(probe.acf()) -Error in probe.acf() : 'probe.acf' is defunct. -Use 'probe_acf' instead. -See help("Defunct") -> try(probe.ccf()) -Error in probe.ccf() : 'probe.ccf' is defunct. -Use 'probe_ccf' instead. -See help("Defunct") -> try(probe.marginal()) -Error in probe.marginal() : 'probe.marginal' is defunct. -Use 'probe_marginal' instead. -See help("Defunct") -> try(probe.mean()) -Error in probe.mean() : 'probe.mean' is defunct. -Use 'probe_mean' instead. -See help("Defunct") -> try(probe.median()) -Error in probe.median() : 'probe.median' is defunct. -Use 'probe_median' instead. -See help("Defunct") -> try(probe.nlar()) -Error in probe.nlar() : 'probe.nlar' is defunct. -Use 'probe_nlar' instead. -See help("Defunct") -> try(probe.period()) -Error in probe.period() : 'probe.period' is defunct. -Use 'probe_period' instead. -See help("Defunct") -> try(probe.quantile()) -Error in probe.quantile() : 'probe.quantile' is defunct. -Use 'probe_quantile' instead. -See help("Defunct") -> try(probe.sd()) -Error in probe.sd() : 'probe.sd' is defunct. -Use 'probe_sd' instead. -See help("Defunct") -> try(probe.var()) -Error in probe.var() : 'probe.var' is defunct. -Use 'probe_var' instead. -See help("Defunct") -> try(rw.sd()) -Error in rw.sd() : 'rw.sd' is defunct. -Use 'rw_sd' instead. -See help("Defunct") -> try(saved.states()) -Error in saved.states() : 'saved.states' is defunct. -Use 'saved_states' instead. -See help("Defunct") ->