diff --git a/DESCRIPTION b/DESCRIPTION index ba8b378b4..5be75902e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: pomp2 Type: Package Title: Statistical Inference for Partially Observed Markov Processes -Version: 2.0.6.2 +Version: 2.0.7.1 Date: 2018-12-13 Authors@R: c(person(given=c("Aaron","A."),family="King", role=c("aut","cre"),email="kingaa@umich.edu"), @@ -22,8 +22,8 @@ Authors@R: c(person(given=c("Aaron","A."),family="King", URL: https://kingaa.github.io/pomp/ Description: Tools for data analysis with partially observed Markov process (POMP) models (also known as stochastic dynamical systems, hidden Markov models, and nonlinear, non-Gaussian, state-space models). The package provides facilities for implementing POMP models, simulating them, and fitting them to time series data by a variety of frequentist and Bayesian methods. It is also a versatile platform for implementation of inference methods for general POMP models. Depends: R(>= 3.5.0), methods -Imports: stats, graphics, digest, mvtnorm, deSolve, coda, reshape2 -Suggests: magrittr, plyr, ggplot2, knitr, tidyr, dplyr, subplex +Imports: stats, graphics, digest, mvtnorm, deSolve, coda, reshape2, magrittr +Suggests: plyr, ggplot2, knitr, tidyr, dplyr, subplex SystemRequirements: For Windows users, Rtools (see https://cran.r-project.org/bin/windows/Rtools/). License: GPL-3 LazyData: true @@ -106,6 +106,7 @@ Collate: 'ou2.R' 'parmat.R' 'parus.R' + 'pipe.R' 'pred_mean.R' 'pred_var.R' 'show.R' diff --git a/NAMESPACE b/NAMESPACE index 4287b6f5f..36ca5ab23 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,7 @@ S3method(c,Mif2) S3method(c,Pfilter) S3method(c,Pmcmc) S3method(c,Pomp) +export("%>%") export(Csnippet) export(as.pomp) export(bake) @@ -159,6 +160,7 @@ importFrom(graphics,polygon) importFrom(graphics,rect) importFrom(graphics,text) importFrom(graphics,title) +importFrom(magrittr,"%>%") importFrom(mvtnorm,dmvnorm) importFrom(mvtnorm,rmvnorm) importFrom(reshape2,melt) diff --git a/R/pipe.R b/R/pipe.R new file mode 100644 index 000000000..f1d1bb304 --- /dev/null +++ b/R/pipe.R @@ -0,0 +1,4 @@ +##' @importFrom magrittr %>% +##' @docType import +##' @export +magrittr::`%>%` diff --git a/inst/NEWS b/inst/NEWS index 787a76957..b03f20136 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,5 +1,9 @@ _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 _2._0._7: + + • The ‘magrittr’ pipe operator, ‘%>%’, is now re-exported. + _C_h_a_n_g_e_s _i_n '_p_o_m_p' _v_e_r_s_i_o_n _2._0._6: • More examples have been included. diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 554c2e141..dde9dd524 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 2.0.7}{ + \itemize{ + \item The \pkg{magrittr} pipe operator, \code{\%>\%}, is now re-exported. + } +} \section{Changes in \pkg{pomp} version 2.0.6}{ \itemize{ \item More examples have been included. diff --git a/man/reexports.Rd b/man/reexports.Rd index 7010fb218..e8874ed2d 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -1,9 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/melt.R +% Please edit documentation in R/melt.R, R/pipe.R \docType{import} \name{reexports} \alias{reexports} \alias{melt} +\alias{\%>\%} \title{Objects exported from other packages} \keyword{internal} \description{ @@ -11,6 +12,8 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ + \item{magrittr}{\code{\link[magrittr]{\%>\%}}} + \item{reshape2}{\code{\link[reshape2]{melt}}} }} diff --git a/tests/R_v_C.R b/tests/R_v_C.R index 3c2b80624..6ab7223a4 100644 --- a/tests/R_v_C.R +++ b/tests/R_v_C.R @@ -4,7 +4,6 @@ png(filename="R_v_C-%02d.png",res=100) ## ----packages------------------------------------------------------------ library(pomp2) library(ggplot2) -library(magrittr) ## ----seed,echo=FALSE----------------------------------------------------- set.seed(56300069) diff --git a/tests/R_v_C.Rout b/tests/R_v_C.Rout index 1234ecb8a..9267c7d24 100644 --- a/tests/R_v_C.Rout +++ b/tests/R_v_C.Rout @@ -26,7 +26,6 @@ Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. > library(ggplot2) -> library(magrittr) > > ## ----seed,echo=FALSE----------------------------------------------------- > set.seed(56300069) @@ -112,16 +111,16 @@ For information on upgrading your pomp version < 2 code, see the > ## ----comparison---------------------------------------------------------- > system.time(simulate(gompertz,nsim=10000,format="arrays")) user system elapsed - 7.624 0.064 7.688 + 8.072 0.064 8.137 > system.time(simulate(Gompertz,nsim=10000,format="arrays")) user system elapsed - 0.356 0.000 0.355 + 0.396 0.004 0.400 > system.time(pfilter(gompertz,Np=1000)) user system elapsed - 0.636 0.000 0.637 + 0.696 0.000 0.695 > system.time(pfilter(Gompertz,Np=1000)) user system elapsed - 0.052 0.000 0.050 + 0.060 0.000 0.059 > > dev.off() null device diff --git a/tests/abc.R b/tests/abc.R index e8641763c..53d75220e 100644 --- a/tests/abc.R +++ b/tests/abc.R @@ -3,7 +3,6 @@ png(filename="abc-%02d.png",res=100) library(pomp2) -library(magrittr) ou2() -> ou2 diff --git a/tests/abc.Rout.save b/tests/abc.Rout.save index 3e055fd76..3d61e0f04 100644 --- a/tests/abc.Rout.save +++ b/tests/abc.Rout.save @@ -25,7 +25,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > ou2() -> ou2 > diff --git a/tests/basic_probes.R b/tests/basic_probes.R index 11dab8468..2d024baae 100644 --- a/tests/basic_probes.R +++ b/tests/basic_probes.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) library(dplyr) library(tidyr) library(ggplot2) diff --git a/tests/basic_probes.Rout.save b/tests/basic_probes.Rout.save index 2795f9dd0..71dc5a170 100644 --- a/tests/basic_probes.Rout.save +++ b/tests/basic_probes.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(dplyr) Attaching package: 'dplyr' @@ -37,13 +36,6 @@ The following objects are masked from 'package:base': intersect, setdiff, setequal, union > library(tidyr) - -Attaching package: 'tidyr' - -The following object is masked from 'package:magrittr': - - extract - > library(ggplot2) > > set.seed(255066335) diff --git a/tests/concat.R b/tests/concat.R index f76d16b71..098306ad8 100644 --- a/tests/concat.R +++ b/tests/concat.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) try(pomp2:::concat()) try(pomp2:::concat("a","b")) diff --git a/tests/concat.Rout.save b/tests/concat.Rout.save index 35abbacca..582ded436 100644 --- a/tests/concat.Rout.save +++ b/tests/concat.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > try(pomp2:::concat()) Error : 'c' is not defined for objects of mixed class. diff --git a/tests/covmat.R b/tests/covmat.R index e17a006f2..9bc218266 100644 --- a/tests/covmat.R +++ b/tests/covmat.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) library(tidyr) library(dplyr) diff --git a/tests/covmat.Rout.save b/tests/covmat.Rout.save index c19b2870c..430ad8dca 100644 --- a/tests/covmat.Rout.save +++ b/tests/covmat.Rout.save @@ -23,15 +23,7 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(tidyr) - -Attaching package: 'tidyr' - -The following object is masked from 'package:magrittr': - - extract - > library(dplyr) Attaching package: 'dplyr' diff --git a/tests/dp.R b/tests/dp.R index 8a3e054a6..a8c5aa26c 100644 --- a/tests/dp.R +++ b/tests/dp.R @@ -3,7 +3,6 @@ png(filename="dp-%02d.png",res=100) library(pomp2) library(ggplot2) -library(magrittr) library(dplyr) library(tidyr) @@ -53,12 +52,11 @@ sims %>% facet_grid(variable~.id,scales="free_y")+ labs(title="death process, Gillespie",subtitle=expression(mu==0.01)) stopifnot( - sims %>% - group_by(.id) %>% - mutate(s=cumsum(ct),Nn=(N+s)==100) %>% - filter(!Nn) %>% - nrow() %>% - equals(0) +(sims %>% + group_by(.id) %>% + mutate(s=cumsum(ct),Nn=(N+s)==100) %>% + filter(!Nn) %>% + nrow()) == 0 ) create_example(simulator="onestep",times=c(0,1,10,100,1000)) %>% @@ -79,14 +77,13 @@ sims %>% ggplot(aes(x=time,y=value,group=interaction(.id,variable)))+ geom_step()+ facet_grid(variable~.id,scales="free_y")+ - labs(title="death process, onestep",subtitle=expression(mu==0.01)) + labs(title="death process, onestep",subtitle=expression(mu==0.01)) stopifnot( - sims %>% - group_by(.id) %>% - mutate(s=cumsum(ct),Nn=(N+s)==100) %>% - filter(!Nn) %>% - nrow() %>% - equals(0) +(sims %>% + group_by(.id) %>% + mutate(s=cumsum(ct),Nn=(N+s)==100) %>% + filter(!Nn) %>% + nrow()) == 0 ) create_example(simulator="euler",times=c(0,1,10,100,1000)) %>% @@ -109,12 +106,11 @@ sims %>% facet_grid(variable~.id,scales="free_y")+ labs(title="death process, Euler",subtitle=expression(mu==0.01)) stopifnot( - sims %>% - group_by(.id) %>% - mutate(s=cumsum(ct),Nn=(N+s)==100) %>% - filter(!Nn) %>% - nrow() %>% - equals(0) +(sims %>% + group_by(.id) %>% + mutate(s=cumsum(ct),Nn=(N+s)==100) %>% + filter(!Nn) %>% + nrow()) == 0 ) create_example(mu=1) %>% diff --git a/tests/dp.Rout.save b/tests/dp.Rout.save index 986d9fcb9..7308a5a8e 100644 --- a/tests/dp.Rout.save +++ b/tests/dp.Rout.save @@ -25,7 +25,6 @@ Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. > library(ggplot2) -> library(magrittr) > library(dplyr) Attaching package: 'dplyr' @@ -39,13 +38,6 @@ The following objects are masked from 'package:base': intersect, setdiff, setequal, union > library(tidyr) - -Attaching package: 'tidyr' - -The following object is masked from 'package:magrittr': - - extract - > > set.seed(49596868L) > @@ -103,12 +95,11 @@ Warning message: + facet_grid(variable~.id,scales="free_y")+ + labs(title="death process, Gillespie",subtitle=expression(mu==0.01)) > stopifnot( -+ sims %>% -+ group_by(.id) %>% -+ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% -+ filter(!Nn) %>% -+ nrow() %>% -+ equals(0) ++ (sims %>% ++ group_by(.id) %>% ++ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% ++ filter(!Nn) %>% ++ nrow()) == 0 + ) > > create_example(simulator="onestep",times=c(0,1,10,100,1000)) %>% @@ -139,14 +130,13 @@ Warning message: + ggplot(aes(x=time,y=value,group=interaction(.id,variable)))+ + geom_step()+ + facet_grid(variable~.id,scales="free_y")+ -+ labs(title="death process, onestep",subtitle=expression(mu==0.01)) ++ labs(title="death process, onestep",subtitle=expression(mu==0.01)) > stopifnot( -+ sims %>% -+ group_by(.id) %>% -+ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% -+ filter(!Nn) %>% -+ nrow() %>% -+ equals(0) ++ (sims %>% ++ group_by(.id) %>% ++ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% ++ filter(!Nn) %>% ++ nrow()) == 0 + ) > > create_example(simulator="euler",times=c(0,1,10,100,1000)) %>% @@ -179,12 +169,11 @@ Warning message: + facet_grid(variable~.id,scales="free_y")+ + labs(title="death process, Euler",subtitle=expression(mu==0.01)) > stopifnot( -+ sims %>% -+ group_by(.id) %>% -+ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% -+ filter(!Nn) %>% -+ nrow() %>% -+ equals(0) ++ (sims %>% ++ group_by(.id) %>% ++ mutate(s=cumsum(ct),Nn=(N+s)==100) %>% ++ filter(!Nn) %>% ++ nrow()) == 0 + ) > > create_example(mu=1) %>% diff --git a/tests/getting_started.R b/tests/getting_started.R index 3dbd74eb3..feb092209 100644 --- a/tests/getting_started.R +++ b/tests/getting_started.R @@ -65,7 +65,6 @@ parus <- pomp(data=parus.dat,time="year",t0=1959, simStates <- simulate(parus,nsim=10,params=c(r=0.2,K=200,sigma=0.5,N.0=200),format="arrays")$states ## ----logistic-plot1,echo=FALSE------------------------------------------- -library(magrittr) library(tidyr) simStates %>% @@ -193,10 +192,10 @@ simulate(tm,nsim=10,format="data.frame",include.data=TRUE) %>% theme_bw() ## ----parus-dprior-------------------------------------------------------- -parus %<>% +parus %>% pomp(dprior=Csnippet(" lik = dunif(r,0,5,1)+dunif(K,100,600,1)+dunif(sigma,0,2,1); lik = (give_log) ? lik : exp(lik); - "),paramnames=c("r","K","sigma")) + "),paramnames=c("r","K","sigma")) -> parus dev.off() diff --git a/tests/getting_started.Rout.save b/tests/getting_started.Rout.save index 13aa3b1bc..48e119aaa 100644 --- a/tests/getting_started.Rout.save +++ b/tests/getting_started.Rout.save @@ -89,15 +89,7 @@ Warning message: 'rmeasure' unspecified: NAs generated. > > ## ----logistic-plot1,echo=FALSE------------------------------------------- -> library(magrittr) > library(tidyr) - -Attaching package: 'tidyr' - -The following object is masked from 'package:magrittr': - - extract - > > simStates %>% + melt() %>% @@ -258,11 +250,11 @@ NULL + theme_bw() > > ## ----parus-dprior-------------------------------------------------------- -> parus %<>% +> parus %>% + pomp(dprior=Csnippet(" + lik = dunif(r,0,5,1)+dunif(K,100,600,1)+dunif(sigma,0,2,1); + lik = (give_log) ? lik : exp(lik); -+ "),paramnames=c("r","K","sigma")) ++ "),paramnames=c("r","K","sigma")) -> parus > > dev.off() null device diff --git a/tests/gillespie.R b/tests/gillespie.R index 60238dbc0..1f174ce48 100644 --- a/tests/gillespie.R +++ b/tests/gillespie.R @@ -2,8 +2,8 @@ options(digits=3) png(filename="gillespie-%02d.png",res=100) library(pomp2) -library(magrittr) library(ggplot2) +library(magrittr) set.seed(754646834L) diff --git a/tests/gillespie.Rout.save b/tests/gillespie.Rout.save index 1c73f8718..953c8c0dc 100644 --- a/tests/gillespie.Rout.save +++ b/tests/gillespie.Rout.save @@ -24,8 +24,8 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(ggplot2) +> library(magrittr) > > set.seed(754646834L) > diff --git a/tests/hitch.R b/tests/hitch.R index 9ef10435a..54153b0eb 100644 --- a/tests/hitch.R +++ b/tests/hitch.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) try(hitch()) diff --git a/tests/hitch.Rout.save b/tests/hitch.Rout.save index 1a7d4b7b6..87295f6ea 100644 --- a/tests/hitch.Rout.save +++ b/tests/hitch.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > try(hitch()) Error : in 'hitch': 'templates' must be supplied. diff --git a/tests/kalman.R b/tests/kalman.R index 4af07afd7..4afec0f88 100644 --- a/tests/kalman.R +++ b/tests/kalman.R @@ -4,7 +4,6 @@ png(filename="kalman-%02d.png",res=100) library(pomp2) library(reshape2) library(plyr) -library(magrittr) library(ggplot2) library(mvtnorm) set.seed(1638125322) diff --git a/tests/kalman.Rout.save b/tests/kalman.Rout.save index 1c8bf0a9d..67a2128f3 100644 --- a/tests/kalman.Rout.save +++ b/tests/kalman.Rout.save @@ -26,7 +26,6 @@ For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. > library(reshape2) > library(plyr) -> library(magrittr) > library(ggplot2) > library(mvtnorm) > set.seed(1638125322) diff --git a/tests/kalman2.R b/tests/kalman2.R index 56339a3ad..3aeee5afc 100644 --- a/tests/kalman2.R +++ b/tests/kalman2.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="kalman2-%02d.png",res=100) library(pomp2) -library(magrittr) set.seed(1968726372) diff --git a/tests/kalman2.Rout.save b/tests/kalman2.Rout.save index 9eb94c5ac..3ecab5b45 100644 --- a/tests/kalman2.Rout.save +++ b/tests/kalman2.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > set.seed(1968726372) > diff --git a/tests/lookup.R b/tests/lookup.R index 50788b499..6f1c61817 100644 --- a/tests/lookup.R +++ b/tests/lookup.R @@ -32,7 +32,6 @@ try(covariate_table(a=1:10,b=10:1,times="b")) try(covariate_table(a=1:10,b=10:1,times="c")) try(covariate_table(a=1:10,b=10:1,times=NA)) -library(magrittr) library(tidyr) library(ggplot2) diff --git a/tests/lookup.Rout.save b/tests/lookup.Rout.save index cc029f371..402f01ec2 100644 --- a/tests/lookup.Rout.save +++ b/tests/lookup.Rout.save @@ -110,15 +110,7 @@ Error : in 'covariate_table': 'times' does not identify a unique time variable. > try(covariate_table(a=1:10,b=10:1,times=NA)) Error : 'covariate_table' is undefined for 'times' of class 'logical'. > -> library(magrittr) > library(tidyr) - -Attaching package: 'tidyr' - -The following object is masked from 'package:magrittr': - - extract - > library(ggplot2) > > covariate_table( diff --git a/tests/measure.R b/tests/measure.R index dc241ddeb..5d11504d2 100644 --- a/tests/measure.R +++ b/tests/measure.R @@ -1,3 +1,5 @@ +options(digits=3) + library(pomp2) library(magrittr) diff --git a/tests/measure.Rout.save b/tests/measure.Rout.save index f04a87e66..a5e51200e 100644 --- a/tests/measure.Rout.save +++ b/tests/measure.Rout.save @@ -17,6 +17,8 @@ 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. +> options(digits=3) +> > library(pomp2) Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the diff --git a/tests/mif2.R b/tests/mif2.R index 9a75b0ba5..065680420 100644 --- a/tests/mif2.R +++ b/tests/mif2.R @@ -6,7 +6,6 @@ set.seed(857075216L) library(pomp2) library(dplyr) library(reshape2) -library(magrittr) gompertz() %>% window(end=10) -> po diff --git a/tests/mif2.Rout.save b/tests/mif2.Rout.save index 96f0f27c4..22ea7da39 100644 --- a/tests/mif2.Rout.save +++ b/tests/mif2.Rout.save @@ -39,7 +39,6 @@ The following objects are masked from 'package:base': intersect, setdiff, setequal, union > library(reshape2) -> library(magrittr) > > gompertz() %>% window(end=10) -> po > diff --git a/tests/mif2_index.R b/tests/mif2_index.R index b37d6ad36..d0877659f 100644 --- a/tests/mif2_index.R +++ b/tests/mif2_index.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) gompertz() -> gompertz diff --git a/tests/mif2_index.Rout.save b/tests/mif2_index.Rout.save index cd518de07..d56370545 100644 --- a/tests/mif2_index.Rout.save +++ b/tests/mif2_index.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> gompertz > diff --git a/tests/nlf.R b/tests/nlf.R index 2b96bd375..1fd61e42a 100644 --- a/tests/nlf.R +++ b/tests/nlf.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="nlf-%02d.png",res=100) library(pomp2) -library(magrittr) set.seed(583615606L) diff --git a/tests/nlf.Rout.save b/tests/nlf.Rout.save index 7474babbc..95dbc6cf2 100644 --- a/tests/nlf.Rout.save +++ b/tests/nlf.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > set.seed(583615606L) > diff --git a/tests/nullcases.R b/tests/nullcases.R index 398969482..9a9e3840f 100644 --- a/tests/nullcases.R +++ b/tests/nullcases.R @@ -1,5 +1,4 @@ library(pomp2) -library(magrittr) simulate(times=1:10,t0=0, statenames="x", diff --git a/tests/nullcases.Rout.save b/tests/nullcases.Rout.save index 8957dc5ea..6f692ec7c 100644 --- a/tests/nullcases.Rout.save +++ b/tests/nullcases.Rout.save @@ -21,7 +21,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > simulate(times=1:10,t0=0, + statenames="x", diff --git a/tests/pfilter.R b/tests/pfilter.R index 6ce7b8d80..1729e709e 100644 --- a/tests/pfilter.R +++ b/tests/pfilter.R @@ -86,7 +86,6 @@ dim(filter.traj(c(pf1,pf4))) names(dimnames(filter.traj(c(pf1,pf4)))) names(melt(as(c(pf1,pf4),"data.frame"))) -library(magrittr) try(ou2 %>% as.data.frame() %>% pfilter(Np=1000)) diff --git a/tests/pfilter.Rout.save b/tests/pfilter.Rout.save index e8049b480..4c42fc79e 100644 --- a/tests/pfilter.Rout.save +++ b/tests/pfilter.Rout.save @@ -227,7 +227,6 @@ No id variables; using all as measure variables No id variables; using all as measure variables [1] "variable" "value" "L1" > -> library(magrittr) > > try(ou2 %>% as.data.frame() %>% pfilter(Np=1000)) Error : in 'pfilter': 'times' should either be a numeric vector of observation times or a single name identifying the column of data that represents the observation times. diff --git a/tests/pmcmc.R b/tests/pmcmc.R index e1495de1b..4297d5f23 100644 --- a/tests/pmcmc.R +++ b/tests/pmcmc.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="pmcmc-%02d.png",res=100) library(pomp2) -library(magrittr) set.seed(857075216L) diff --git a/tests/pmcmc.Rout.save b/tests/pmcmc.Rout.save index c5525f15b..e37b08653 100644 --- a/tests/pmcmc.Rout.save +++ b/tests/pmcmc.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > set.seed(857075216L) > diff --git a/tests/pomp_fun.R b/tests/pomp_fun.R index 9f1dfff2e..fe5ff2ad1 100644 --- a/tests/pomp_fun.R +++ b/tests/pomp_fun.R @@ -1,7 +1,6 @@ options(digits=3,keep.source=TRUE) library(pomp2) -library(magrittr) pomp2:::pomp_fun() pomp2:::pomp_fun(NULL) diff --git a/tests/pomp_fun.Rout.save b/tests/pomp_fun.Rout.save index 8d7814d40..8f43e8b6c 100644 --- a/tests/pomp_fun.Rout.save +++ b/tests/pomp_fun.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > pomp2:::pomp_fun() diff --git a/tests/pomp_methods.R b/tests/pomp_methods.R index 897954204..e08eb08f9 100644 --- a/tests/pomp_methods.R +++ b/tests/pomp_methods.R @@ -1,5 +1,4 @@ library(pomp2) -library(magrittr) gompertz() -> po diff --git a/tests/pomp_methods.Rout.save b/tests/pomp_methods.Rout.save index ed19387be..a7fee39c5 100644 --- a/tests/pomp_methods.Rout.save +++ b/tests/pomp_methods.Rout.save @@ -21,7 +21,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> po > diff --git a/tests/probe.R b/tests/probe.R index 4a8cfd233..96fb4ef28 100644 --- a/tests/probe.R +++ b/tests/probe.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="probe-%02d.png",res=100) library(pomp2) -library(magrittr) gompertz() -> gompertz diff --git a/tests/probe.Rout.save b/tests/probe.Rout.save index 55f67561d..be4fb0a5e 100644 --- a/tests/probe.Rout.save +++ b/tests/probe.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> gompertz > diff --git a/tests/probe_match.R b/tests/probe_match.R index 6130ddc0a..987cb62e8 100644 --- a/tests/probe_match.R +++ b/tests/probe_match.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="probe_match-%02d.png",res=100) library(pomp2) -library(magrittr) gompertz() -> po po %>% as.data.frame() %>% subset(select=-X) -> dat diff --git a/tests/probe_match.Rout.save b/tests/probe_match.Rout.save index b765f1271..a7f335e1c 100644 --- a/tests/probe_match.Rout.save +++ b/tests/probe_match.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> po > po %>% as.data.frame() %>% subset(select=-X) -> dat diff --git a/tests/proposals.R b/tests/proposals.R index 6fc835f94..0bcc698d9 100644 --- a/tests/proposals.R +++ b/tests/proposals.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) ou2() -> po diff --git a/tests/proposals.Rout.save b/tests/proposals.Rout.save index f074c8769..3cff68eea 100644 --- a/tests/proposals.Rout.save +++ b/tests/proposals.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > ou2() -> po > diff --git a/tests/resample.R b/tests/resample.R index c2acc3862..ddf6d111e 100644 --- a/tests/resample.R +++ b/tests/resample.R @@ -1,5 +1,4 @@ library(pomp2) -library(magrittr) set.seed(807969746L) w <- runif(100) diff --git a/tests/resample.Rout.save b/tests/resample.Rout.save index fdbbc1ff0..182805c91 100644 --- a/tests/resample.Rout.save +++ b/tests/resample.Rout.save @@ -21,7 +21,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > set.seed(807969746L) > > w <- runif(100) diff --git a/tests/rinit.R b/tests/rinit.R index 0f41bcfe6..4b2752b92 100644 --- a/tests/rinit.R +++ b/tests/rinit.R @@ -1,5 +1,4 @@ library(pomp2) -library(magrittr) set.seed(807969746L) gompertz() -> gompertz diff --git a/tests/rinit.Rout.save b/tests/rinit.Rout.save index 5da5c932a..3111a046a 100644 --- a/tests/rinit.Rout.save +++ b/tests/rinit.Rout.save @@ -21,7 +21,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > set.seed(807969746L) > > gompertz() -> gompertz diff --git a/tests/sannbox.R b/tests/sannbox.R index f241f0411..d514a12d2 100644 --- a/tests/sannbox.R +++ b/tests/sannbox.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) set.seed(240311270) diff --git a/tests/sannbox.Rout.save b/tests/sannbox.Rout.save index 26727086a..6e5668ed1 100644 --- a/tests/sannbox.Rout.save +++ b/tests/sannbox.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > set.seed(240311270) > diff --git a/tests/simulate.R b/tests/simulate.R index 7326502e6..cd4de7daa 100644 --- a/tests/simulate.R +++ b/tests/simulate.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="simulate-%02d.png",res=100) library(pomp2) -library(magrittr) library(dplyr) set.seed(1041414791L) diff --git a/tests/simulate.Rout.save b/tests/simulate.Rout.save index 605db3d9d..8abc294c3 100644 --- a/tests/simulate.Rout.save +++ b/tests/simulate.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(dplyr) Attaching package: 'dplyr' diff --git a/tests/simulate_data_frame.R b/tests/simulate_data_frame.R index 165765097..34f562a5d 100644 --- a/tests/simulate_data_frame.R +++ b/tests/simulate_data_frame.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) library(dplyr) set.seed(1041414791L) diff --git a/tests/simulate_data_frame.Rout.save b/tests/simulate_data_frame.Rout.save index 6e612c645..975f3a7c8 100644 --- a/tests/simulate_data_frame.Rout.save +++ b/tests/simulate_data_frame.Rout.save @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(dplyr) Attaching package: 'dplyr' diff --git a/tests/skeleton.R b/tests/skeleton.R index 186633f86..9fd5c54f9 100644 --- a/tests/skeleton.R +++ b/tests/skeleton.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="skeleton-%02d.png",res=100) library(pomp2) -library(magrittr) library(ggplot2) library(reshape2) library(plyr) diff --git a/tests/skeleton.Rout.save b/tests/skeleton.Rout.save index cb83cb04c..70eff4874 100644 --- a/tests/skeleton.Rout.save +++ b/tests/skeleton.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > library(ggplot2) > library(reshape2) > library(plyr) diff --git a/tests/spect.R b/tests/spect.R index cf7d71a1e..523cc8b30 100644 --- a/tests/spect.R +++ b/tests/spect.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="spect-%02d.png",res=100) library(pomp2) -library(magrittr) gompertz() -> gompertz set.seed(362083261L) diff --git a/tests/spect.Rout.save b/tests/spect.Rout.save index 132afe847..405669711 100644 --- a/tests/spect.Rout.save +++ b/tests/spect.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> gompertz > set.seed(362083261L) diff --git a/tests/spect_match.R b/tests/spect_match.R index 33e0ce8f0..6a33ae7a4 100644 --- a/tests/spect_match.R +++ b/tests/spect_match.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="spect_match-%02d.png",res=100) library(pomp2) -library(magrittr) ou2() -> ou2 ou2 %>% as.data.frame() %>% subset(select=c(time,y1,y2)) -> dat diff --git a/tests/spect_match.Rout.save b/tests/spect_match.Rout.save index 5a422d192..2d79aa860 100644 --- a/tests/spect_match.Rout.save +++ b/tests/spect_match.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > ou2() -> ou2 > ou2 %>% as.data.frame() %>% subset(select=c(time,y1,y2)) -> dat diff --git a/tests/spy.R b/tests/spy.R index d5bf718ab..0f5e8e765 100644 --- a/tests/spy.R +++ b/tests/spy.R @@ -1,7 +1,6 @@ options(digits=3) library(pomp2) -library(magrittr) gompertz() -> po diff --git a/tests/spy.Rout b/tests/spy.Rout index 32f109b58..dc4f7dcdc 100644 --- a/tests/spy.Rout +++ b/tests/spy.Rout @@ -23,7 +23,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > gompertz() -> po > @@ -167,8 +166,8 @@ params - C snippet file 1 : /* pomp C snippet file: nancy */ -/* Time: 2018-09-25 08:31:54.935 -0400 */ -/* Salt: F647BB68A6426DE9FA44EFBC */ +/* Time: 2018-10-02 18:32:54.712 -0400 */ +/* Salt: 9948ABA0AF9FBAC89102CAC6 */ #include #include @@ -292,8 +291,8 @@ pomp object 'sir': - C snippet file 1 : /* pomp C snippet file: sir_source */ -/* Time: 2018-09-25 08:31:55.008 -0400 */ -/* Salt: 4C16E0EC9C9731CD0CFD7AFA */ +/* Time: 2018-10-02 18:32:54.896 -0400 */ +/* Salt: E7824DBCE9355F43D07EA95F */ #include #include @@ -818,8 +817,8 @@ x1_0 x2_0 s1 s2 tau - C snippet file 1 : /* pomp C snippet file: rw2_source */ -/* Time: 2018-09-25 08:31:55.344 -0400 */ -/* Salt: B44732FB6FD015DFC623D5EA */ +/* Time: 2018-10-02 18:32:55.766 -0400 */ +/* Salt: 39206376C5CAC190BE5B252C */ #include #include @@ -1021,8 +1020,8 @@ variable birth susc.death infection inf.death recovery recov.death - C snippet file 1 : /* pomp C snippet file: sir2_source */ -/* Time: 2018-09-25 08:31:55.603 -0400 */ -/* Salt: 54DA18E08642E17008460E90 */ +/* Time: 2018-10-02 18:32:56.489 -0400 */ +/* Salt: 93A1AB8D8A45B3EA5241F33D */ #include #include diff --git a/tests/traj_match.R b/tests/traj_match.R index 66294be4b..6301a6ded 100644 --- a/tests/traj_match.R +++ b/tests/traj_match.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="traj_match-%02d.png",res=100) library(pomp2) -library(magrittr) ou2() -> ou2 diff --git a/tests/traj_match.Rout.save b/tests/traj_match.Rout.save index e779b267f..e4b2dd806 100644 --- a/tests/traj_match.Rout.save +++ b/tests/traj_match.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > ou2() -> ou2 > diff --git a/tests/trajectory.R b/tests/trajectory.R index 7567adc95..433d33fad 100644 --- a/tests/trajectory.R +++ b/tests/trajectory.R @@ -2,7 +2,6 @@ options(digits=3) png(filename="trajectory-%02d.png",res=100) library(pomp2) -library(magrittr) pomp( data=NULL, diff --git a/tests/trajectory.Rout.save b/tests/trajectory.Rout.save index 3ce04cd56..fb712ccbc 100644 --- a/tests/trajectory.Rout.save +++ b/tests/trajectory.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > pomp( + data=NULL, diff --git a/tests/userdata.R b/tests/userdata.R index ad12df79d..955c6afae 100644 --- a/tests/userdata.R +++ b/tests/userdata.R @@ -2,7 +2,6 @@ options(digits=3) set.seed(58668844L) library(pomp2) -library(magrittr) simulate(times=seq(1,100),t0=0, nbasis=9L, @@ -56,4 +55,4 @@ try(po %>% stopifnot(po %>% simulate(rprocess=onestep( Csnippet("int nbasis = *(get_userdata_int(\"bob\"));")), - bob=3L) %>% class() %>% equals("pomp")) + bob=3L) %>% class() %>% magrittr::equals("pomp")) diff --git a/tests/userdata.Rout.save b/tests/userdata.Rout.save index 10c46c0ba..68daca25e 100644 --- a/tests/userdata.Rout.save +++ b/tests/userdata.Rout.save @@ -24,7 +24,6 @@ Type 'q()' to quit R. Welcome to pomp version 2! For information on upgrading your pomp version < 2 code, see the 'pomp version 2 upgrade guide' at https://kingaa.github.io/pomp/. -> library(magrittr) > > simulate(times=seq(1,100),t0=0, + nbasis=9L, @@ -87,6 +86,6 @@ Error : in 'simulate': user-data element 'bob' is not an integer. > stopifnot(po %>% + simulate(rprocess=onestep( + Csnippet("int nbasis = *(get_userdata_int(\"bob\"));")), -+ bob=3L) %>% class() %>% equals("pomp")) ++ bob=3L) %>% class() %>% magrittr::equals("pomp")) in 'pomp': the unrecognized argument 'bob' is available for use by the POMP basic components. >