diff --git a/DESCRIPTION b/DESCRIPTION index f95fb21c..a1a69ffd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: pomp Type: Package Title: Statistical Inference for Partially Observed Markov Processes -Version: 5.4.1.0 -Date: 2023-08-08 +Version: 5.4.2.0 +Date: 2023-10-08 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")), diff --git a/R/objfun.R b/R/objfun.R index 88098378..ecc459f4 100644 --- a/R/objfun.R +++ b/R/objfun.R @@ -66,10 +66,10 @@ setMethod( } ) -setAs( - from="objfun", - to="pomp", - def = function (from) { +setIs( + class1="objfun", + class2="pomp", + coerce = function (from) { as(from@env$object,"pomp") } ) diff --git a/inst/NEWS b/inst/NEWS index 0a190c06..a8979ea7 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._4._2: + + • State objective functions (class ‘objfun’) now behave as if + they are ‘pomp’ objects. + _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _5._4._1: • C-level functions ‘set_pomp_userdata’ and diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index b9c301b8..9331cfd9 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.4.2}{ + \itemize{ + \item State objective functions (class \sQuote{objfun}) now behave as if they are \sQuote{pomp} objects. + } +} \section{Changes in \pkg{pomp} version 5.4.1}{ \itemize{ \item C-level functions \code{set_pomp_userdata} and \code{unset_pomp_userdata} are no longer exported.