Running '_options.R' [1s]
  Comparing '_options.Rout' to '_options.Rout.save' ... OK
  Running 'aaa.R' [145s]
  Running 'contacts.R' [13s]
  Comparing 'contacts.Rout' to 'contacts.Rout.save' ...14c14
< name [,1] [,2] [,3] [,4]
---
> variable [,1] [,2] [,3] [,4]
17c17
< name [,1] [,2] [,3] [,4]
---
> variable [,1] [,2] [,3] [,4]
  Running 'get_col_row.R' [1s]
  Comparing 'get_col_row.Rout' to 'get_col_row.Rout.save' ... OK
  Running 'mif2.R' [3s]
  Comparing 'mif2.Rout' to 'mif2.Rout.save' ... OK
  Running 'mif2_intern.R' [3s]
  Comparing 'mif2_intern.Rout' to 'mif2_intern.Rout.save' ... OK
  Running 'mif2_methods.R' [3s]
  Comparing 'mif2_methods.Rout' to 'mif2_methods.Rout.save' ... OK
  Running 'panelGompertz.R' [3s]
  Comparing 'panelGompertz.Rout' to 'panelGompertz.Rout.save' ...14c14
< name     [,1]      [,2]     [,3]      [,4]     [,5]
---
> variable     [,1]      [,2]     [,3]      [,4]     [,5]
17c17
< name      [,1]     [,2]     [,3]    [,4]     [,5]
---
> variable      [,1]     [,2]     [,3]    [,4]     [,5]
  Running 'panelGompertzLikelihood.R' [149s]
  Running 'panelPomp.R' [5s]
  Comparing 'panelPomp.Rout' to 'panelPomp.Rout.save' ... OK
  Running 'panelPomp_methods.R' [159s]
  Running 'panelRandomWalk.R' [153s]
  Running 'panel_loglik.R' [156s]
  Running 'params.R' [163s]
  Running 'pfilter.R' [6s]
  Comparing 'pfilter.Rout' to 'pfilter.Rout.save' ... OK
  Running 'pfilter_methods.R' [3s]
  Comparing 'pfilter_methods.Rout' to 'pfilter_methods.Rout.save' ... OK
  Running 'plot.R' [3s]
  Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
  Running 'print-results.R' [164s]
  Running 'seeded-results.R' [173s]
  Running 'simulate.R' [3s]
  Comparing 'simulate.Rout' to 'simulate.Rout.save' ...11c11
< name     [,1]     [,2]     [,3]     [,4]      [,5]
---
> variable     [,1]     [,2]     [,3]     [,4]      [,5]
Running the tests in 'tests/aaa.R' failed.
Complete output:
  > ## test aaa.R
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > TESTS_PASS <- NULL
  > ## alternatively: assign(eval(formals(test))$all,NULL) (after defining test)
  > ## does panelPomp:::test (used to test all other codes) work?
  > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...)
  +   panelPomp:::test(expr1,expr2,all=all,env=env,...)
  > 
  > test(NULL,NULL)
  [1] TRUE
  > ## ... test unevaluated multiple-line expression, ...
  > test(
  +   quote(
  +     {a_multi_line_expression <- NA
  +     "where_objects_are_defined" -> is_not_evald
  +     NULL}),NULL)
  [1] TRUE
  > test(exists("is_not_evald"),FALSE)
  [1] TRUE
  > ## if only one argument ...
  > test(length(get(eval(formals(test))$all))==3)
  [1] TRUE
  > ## ... the result isn't necessarily logical: hence, 'all' is not changed!
  > test(length(get(eval(formals(test))$all)),3L)
  [1] TRUE
  > ## test order of expr1 and expr2
  > test(4L,length(get(eval(formals(test))$all)))
  [1] TRUE
  > ## test stop for wrong parameters
  > # "Error in eval(expr1) : object 'invalid_expr' not found\n"
  > test(class(try(stop(test(invalid_expr)),silent=TRUE)),"try-error")
  [1] TRUE
  > test(wQuotes("Error : in ''test'': missing vector to accumulate logical test ",
  +              "results.\n"),
  +      panelPomp:::test(NULL,expr2=NULL,all="wrong_all",env=parent.frame()))
  [1] TRUE
  > test("Error in exists(all, envir = env) : invalid 'envir' argument\n",
  +      panelPomp:::test(NULL,NULL,all=eval(formals(test))$all,env="no_env"))
  [1] TRUE
  > ## test identical for range of objects
  > test(NA,NA)
  [1] TRUE
  > test(1,1)
  [1] TRUE
  > test(1L,1L)
  [1] TRUE
  > test("a","a")
  [1] TRUE
  > test(matrix(1,nrow=2),matrix(1,nrow=2))
  [1] TRUE
  > test(list(a="a",b="b"),list(a="a",b="b"))
  [1] TRUE
  > test(c(TRUE,FALSE),c(TRUE,FALSE))
  [1] TRUE
  > ## consider further testing panelPomp:::test ...
  > ## capturing warnings, ...
  > ## warn <- options(warn=2) # to convert warnings to errors
  > ## test()
  > ## options(warn)
  > ## partially matching error messages, ...
  > ## test(grepl(wQuotes("Error "),test(),fixed=TRUE),TRUE)
  > 
  > ## if all tests for panelPomp:::test passed ...
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > ## ... continue testing the rest of the code
  > 
  > 
  > ## runif.EstimationScale
  > test(class(panelPomp:::runif.EstimationScale(centers=c(th=1),widths=2))[1],
  +      "numeric")
  [1] TRUE
  > 
  > ## wQuotes
  > ## check for ' in different positions in the character
  > test(wQuotes("''Error''")==paste0(sQuote("Error")))
  [1] TRUE
  > test(wQuotes("Error")=="Error")
  [1] TRUE
  > test(wQuotes("''Error'' : in")==paste0(sQuote("Error")," : in"))
  [1] TRUE
  > test(wQuotes("Error : in ''fn''")==paste0("Error : in ",sQuote("fn")))
  [1] TRUE
  > test(wQuotes("''Error'' : in ''fn'': ''object'' is a required argument"),
  +      paste0(sQuote("Error")," : in ",sQuote("fn"),": ",sQuote("object"),
  +             " is a required argument"))
  [1] TRUE
  > test(wQuotes("Error : in ''fn'': ''object'' is a required argument"),
  +      paste0("Error : in ",sQuote("fn"),": ",sQuote("object"),
  +             " is a required argument"))
  [1] TRUE
  > test(wQuotes("in ''fn''",": ''object'' is"," a required argument"," Error : in",
  +              " ''fn'': ''object'' is a required argument"),
  +      paste0("in ",sQuote("fn"),": ",sQuote("object")," is a required argument",
  +             " Error : in ",sQuote("fn"),": ",sQuote("object"),
  +             " is a required argument"))
  [1] TRUE
  > ## test passing wQuotes as first argument to stop
  > test(as.character(
  +   attr(try(stop(wQuotes("in ''fn'': ''object'' is a required argument")),
  +            silent=TRUE),"condition")),
  +   paste0(
  +     "Error in doTryCatch(return(expr), name, parentenv, handler): in ",
  +     sQuote("fn"),": ",sQuote("object")," is a required argument\n"))
  [1] TRUE
  > 
  > ## test quoting variables
  > test(wQuotes("''",TESTS_PASS[1],"''")==sQuote("TRUE"))
  [1] TRUE
  > 
  > ## final check: do all tests pass?
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > 
  > proc.time()
     user  system elapsed 
     0.67    0.17    0.78 
Running the tests in 'tests/panelGompertzLikelihood.R' failed.
Complete output:
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > TESTS_PASS <- NULL
  > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...)
  +   panelPomp:::test(expr1,expr2,all=all,env=env,...)
  > 
  > g <- panelGompertz(N=5,U=2)
  > estNames<- c("r",paste0("tau[unit",1:length(g),"]"))
  > theta_start <- coef(g)[estNames]
  > gLik <- panelGompertzLikelihood(theta_start,g,coef(g))
  > gLik
  [1] -2.122622
  > 
  > pomp::stew(file="panelGompertzLikelihood.rda",seed=2358,{
  +   g_pfLik <- logLik(pfilter(g,Np=5000))
  + })
  > test(abs(g_pfLik-gLik)<1,TRUE)
  [1] TRUE
  > 
  > gMLE <- optim(
  +     par=theta_start,
  +     fn=panelGompertzLikelihood,
  +     panelPompObject=g,
  +     params=coef(g),
  +     hessian=TRUE,
  +     control=list(trace=0,fnscale=-1)
  +   )
  > 
  > gMLE$val
  [1] -0.6954027
  > gMLE$par
            r  tau[unit1]  tau[unit2] 
  -0.05145418  0.14961755  0.17785801 
  > theta_start
           r tau[unit1] tau[unit2] 
         0.1        0.1        0.1 
  > 
  > ## check whether all tests passed
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > 
  > proc.time()
     user  system elapsed 
     1.60    0.14    3.84 
Running the tests in 'tests/panelPomp_methods.R' failed.
Complete output:
  > ## test codes in R/panelPomp_methods.R
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > TESTS_PASS <- NULL
  > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...)
  +   panelPomp:::test(expr1,expr2,all=all,env=env,...)
  > 
  > ppo <- panelRandomWalk(U=2,N=5)
  > pP2 <- list(shared=c(sigmaX=1,sigmaY=2),
  +             specific=matrix(c(0,0.1),nr=1,
  +                             dimnames=list(param="X.0",unit=c("rw1","rw2"))))
  > ppo <- panelPomp(unitobjects(ppo),shared=pP2$shared,specific=pP2$specific)
  > # other definitions from old test file
  > pg <- panelGompertz(U=3,N=5)
  > pgl <- as(pg,"list")
  > g <- pgl[[1]]; coef(g) <- c(pparams(pg)$sh, pparams(pg)$sp[,1])
  > pp <- panelPomp(list(g,g),shared=pg@shared,
  +                 specific=pg@specific[,1:2])
  > 
  > ## coef,panelPomp-method
  > test(coef(ppo),
  +      setNames(c(1,2,0,0.1),c("sigmaX","sigmaY","X.0[rw1]","X.0[rw2]")))
  [1] TRUE
  > 
  > ## coef<-,panelPomp-method
  > test(coef(ppo),{coef(ppo) <- 2*coef(ppo);coef(ppo) <- coef(ppo)/2;coef(ppo)})
  [1] TRUE
  > test(coef(ppo),
  +      {coef(ppo) <- as.list(
  +        setNames(c(1,2,0,0.1),c("sigmaX","sigmaY","X.0[rw1]","X.0[rw2]")))
  +      coef(ppo)})
  [1] TRUE
  > wQuotes("Error : in ''coef<-'': part of ''value'' is not part of ",
  +                "''coef(object)''.\n") -> err
  > test(coef(ppo) <- c(ppo@shared,xsh=5),err)
  [1] TRUE
  > test(coef(ppo) <- c(coef(ppo),xsh=5),err)
  [1] TRUE
  > test({coef(ppo) <- setNames(
  +   c(coef(ppo),5,6),c(names(coef(ppo)),
  +                      sprintf("xsp[rw1]"),sprintf("xsp[rw2]")))},err)
  [1] TRUE
  > test({coef(ppo) <- setNames(
  +   c(coef(ppo),5,6,7),c(names(coef(ppo)),
  +                        sprintf("xsp[rw1]"),sprintf("xsp[rw2]"),"xsh"))},err)
  [1] TRUE
  > test({coef(ppo) <- setNames(
  +   c(coef(ppo)[-c(1:2)],5,6),c(names(coef(ppo)[-c(1:2)]),
  +                               sprintf("xsp[rw1]"),sprintf("xsp[rw2]")))},err)
  [1] TRUE
  > wQuotes("Error : in ''coef<-'': part of ''coef(object)'' is not specified ",
  +                "in ''value''.\n") -> err
  > test(coef(ppo) <- coef(ppo)[-c(1:2)],err)
  [1] TRUE
  > test(coef(ppo) <- ppo@shared,err)
  [1] TRUE
  > ## test length,panelPomp-method
  > test(length(ppo),2L)
  [1] TRUE
  > ## test names,panelPomp-method
  > test(names(ppo),c("rw1","rw2"))
  [1] TRUE
  > ## test pparams,panelPomp-method
  > test(pparams(ppo),list(shared=ppo@shared,specific=ppo@specific))
  [1] TRUE
  > ## test pParams function
  > ## all sh
  > test(pParams(coef(ppo)[grep("^.+\\[.+?\\]$",names(coef(ppo)),perl=TRUE,
  +                             value=TRUE,invert=TRUE)]),
  +      list(shared=ppo@shared,specific=array(numeric(0),dim=c(0,0))))
  [1] TRUE
  > ## all sp
  > test(list(shared=numeric(0),specific=ppo@specific),
  +      pParams(coef(ppo)[grep("^.+\\[.+?\\]$",names(coef(ppo)),perl=TRUE,
  +                             value=TRUE)]))
  [1] TRUE
  > ## both sh & sp
  > test(pParams(coef(ppo)),list(shared=ppo@shared,specific=ppo@specific))
  [1] TRUE
  > ## test unitobjects,panelPomp-method
  > test(unitobjects(ppo),ppo@unit.objects)
  [1] TRUE
  > coef(ppo[["rw1"]])
  sigmaX sigmaY    X.0 
       1      2      0 
  > ## test print function (tested in 'print-results.Rout.save')
  > ## test show function (tested in 'print-results.Rout.save')
  > ## test window,panelPomp-method
  > test(length(ppo[1])==1L)
  [1] TRUE
  > test(setNames(c(1,2,0),c("sigmaX","sigmaY",sprintf("X.0[rw1]"))),
  +      coef(ppo[1]))
  [1] TRUE
  > test(lapply(as(window(ppo,start=2),"list"),time),list(rw1=c(2,3,4,5),rw2=c(2,3,4,5)))
  [1] TRUE
  > test(lapply(as(window(ppo,end=2),"list"),time),list(rw1=c(1,2),rw2=c(1,2)))
  [1] TRUE
  > test(length(window(ppo[1:2],start=1,end=2)),2L)
  [1] TRUE
  > test(lapply(as(window(ppo[1],start=1,end=2),"list"),time),list(rw1=c(1,2)))
  [1] TRUE
  > 
  > 
  > 
  > ## as(,'list') returns list of units with parameters
  > test(as(pg,"list")[[1]]@data,pg@unit.objects[[1]]@data)
  [1] TRUE
  > 
  > ## as(,'pompList')
  > test(as(pg,'pompList')[[1]]@data,pg@unit.objects[[1]]@data)
  [1] TRUE
  > 
  > ## test as(,'data.frame')
  > test(dim(as(pg,"data.frame")),c(15L,4L))
  [1] TRUE
  > test(names(as(pg,"data.frame")),c("t","Y","X","unit"))
  [1] TRUE
  > 
  > ## show
  > show(ppo)
  <object of class 'panelPomp'>
  panel of 2 units 
  parameter(s):
  $shared
  sigmaX sigmaY 
       1      2 
  
  $specific
       unit
  param rw1 rw2
    X.0   0 0.1
  
  summary of first panel unit ("rw1"):
  <object of class 'pomp'>
  > show(panelPomp(unitobjects(ppo)))
  <object of class 'panelPomp'>
  panel of 2 units 
  parameter(s) unspecified
  summary of first panel unit ("rw1"):
  <object of class 'pomp'>
  > 
  > ## check whether all tests passed
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > 
  > proc.time()
     user  system elapsed 
     0.85    0.23    5.42 
Running the tests in 'tests/panelRandomWalk.R' failed.
Complete output:
  > # check reproducibility over two randomly chosen seeds
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > seeds <- c(2112533L,188933L)
  > po <- panelPomp:::panelRandomWalk(N=5,U=2)[[1]]
  > for (s in seq_along(seeds)) {
  +   set.seed(seeds[s])
  +   print(obs(simulate(po)))
  + }
      t
  name   [,1]     [,2]     [,3]     [,4]     [,5]
     Y 1.6824 1.516507 2.589073 2.806288 5.668038
      t
  name    [,1]       [,2]      [,3]      [,4]      [,5]
     Y 2.38056 -0.4932766 -1.502169 -1.994364 -2.069097
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.79    0.17    3.04 
Running the tests in 'tests/panel_loglik.R' failed.
Complete output:
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > TESTS_PASS <- NULL
  > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...)
  +   panelPomp:::test(expr1,expr2,all=all,env=env,...)
  > 
  > ## basic checks for logLik, matrix-method
  > repMargin <- 1
  > unit1.ll <- 1
  > unit2.ll <- 10
  > object <- ulls <- matrix(c(unit1.ll,unit1.ll,unit2.ll,unit2.ll),nr=2,nc=2,
  +                          byrow=ifelse(repMargin==1,FALSE,TRUE))
  > exp.ll <- unit1.ll + unit2.ll
  > exp.se <- 0
  > 
  > chck.avl <- logLik(ulls,repMargin=repMargin,first="aver",aver="logmeanexp",se=TRUE)
  > chck.avm <- logLik(ulls,repMargin=repMargin,first="aver",aver="mean",se=TRUE)
  > chck.agl <- logLik(ulls,repMargin=repMargin,first="aggr",aver="logmeanexp",se=TRUE)
  > chck.agm <- logLik(ulls,repMargin=repMargin,first="aggr",aver="mean",se=TRUE)
  > 
  > test(TRUE,all(c(
  +   chck.avl==c(exp.ll,exp.se),
  +   chck.avm==c(exp.ll,exp.se),
  +   chck.agl==c(exp.ll,exp.se),
  +   chck.agm==c(exp.ll,exp.se))))
  [1] TRUE
  > 
  > ## test se=FALSE
  > test(c("","se"),
  +      names(
  +        logLik(ulls,repMargin=repMargin,first="aver",aver="logmeanexp",se=TRUE)
  +      ))
  [1] TRUE
  > test(unit1.ll+unit2.ll,
  +      logLik(ulls,repMargin=repMargin,first="aver",aver="logmeanexp",se=FALSE))
  [1] TRUE
  > 
  > ## test first='aver' & aver='logmeanexp' for logLik, matrix-method
  > repMargin <- 2
  > unit1.ll <- 2
  > unit2.ll <- 10
  > object <- ulls <- matrix(
  +   c(log(0.5*exp(unit1.ll)),log(1.5*exp(unit1.ll)),unit2.ll,unit2.ll),
  +   nr=2,nc=2,byrow=ifelse(repMargin==1,FALSE,TRUE)
  + )
  > chck <- logLik(ulls,repMargin=repMargin,first="aver",aver="logmeanexp",se=TRUE)
  > test(unname(chck[1]),c(unit1.ll + unit2.ll))
  [1] TRUE
  > 
  > ## test aver='mean' for logLik, matrix-method
  > repMargin <- 1
  > unit1.ll <- 1
  > unit2.ll <- 10
  > object <- ulls <- matrix(
  +   c(unit1.ll+0.5,unit1.ll-0.5,unit2.ll,unit2.ll),
  +   nr=2,nc=2,byrow=ifelse(repMargin==1,FALSE,TRUE)
  + )
  > chck <- logLik(ulls,repMargin=repMargin,first="aggr",aver="mean",se=TRUE)
  > test(unname(chck[1]),c(unit1.ll + unit2.ll))
  [1] TRUE
  > 
  > ## test panel_logmeanexp
  > repMargin <- 1
  > ul1 <- 1
  > ul2 <- 10
  > uls <- matrix(c(ul1,ul1,ul2,ul2),nr=2,byrow=ifelse(repMargin==1,FALSE,TRUE))
  > expected_output <- setNames(c(ul1+ul2,0),nm=c("","se"))
  > 
  > test(panel_logmeanexp(uls,MARGIN=ifelse(repMargin==1,2,1),se=FALSE),
  +      unname(expected_output[1]))
  [1] TRUE
  > test(panel_logmeanexp(uls,MARGIN=ifelse(repMargin==1,2,1),se=TRUE),
  +      expected_output)
  [1] TRUE
  > 
  > ## check whether all tests passed
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > 
  > proc.time()
     user  system elapsed 
     0.53    0.17    0.71 
Running the tests in 'tests/params.R' failed.
Complete output:
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > TESTS_PASS <- NULL
  > 
  > test <- function(expr1,expr2,all="TESTS_PASS",env=parent.frame(),...)
  +   panelPomp:::test(expr1,expr2,all=all,env=env,...)
  > 
  > pg <- panelGompertz(U=3,N=10)
  > sh <- c(shared.1=1,shared.2=2)
  > u <- 5 # at least 1
  > sp <- matrix(
  +   as.numeric(paste0(rep(seq(3,u+2),each=2),rep(c(".1",".2"),times=u))),
  +   nrow=2,
  +   dimnames=list(c("spec.1","spec.2"),c(paste0("unit.",1:u)))
  + )
  > 
  > ## recovec pParams (shared parameters only)
  > test(list(shared=sh,specific=array(
  +   numeric(0),dim=c(0,ncol(sp)),dimnames=list(NULL,colnames(sp)))),
  +   fromVectorPparams(toVectorPparams(list(shared=sh,specific=array(
  +     numeric(0),dim=c(0,ncol(sp)),dimnames=list(NULL,colnames(sp)))))))
  [1] TRUE
  > ## recovec pParams (specific parameters only)
  > test(list(shared=numeric(0),specific=sp),
  +   fromVectorPparams(toVectorPparams(list(shared=numeric(0),specific=sp))))
  [1] TRUE
  > ## recovec pParams (both)
  > test(list(shared=sh,specific=sp),
  +      fromVectorPparams(toVectorPparams(list(shared=sh,specific=sp))))
  [1] TRUE
  > 
  > ## tolspPs and toMatrixPparams work (shared parameters only)
  > list(shared=sh,specific=array(numeric(0),dim=c(0,ncol(sp)),
  +                               dimnames=list(NULL,colnames(sp)))) -> lspPs
  > matrixPparams <- panelPomp:::toMatrixPparams(lspPs)
  > vector.position.in.lspPs <- which(sapply(lspPs,is.vector))
  > names.in.vector <- names(lspPs[vector.position.in.lspPs]$shared)
  > vector.name.in.lspPs <- names(lspPs)[vector.position.in.lspPs]
  > matrix.name.in.lspPs <- names(lspPs)[ifelse(vector.position.in.lspPs==1,2,1)]
  > res <- panelPomp:::toListPparams(
  +   matrixPparams=matrixPparams,names.in.vector=names.in.vector,
  +   vector.position.in.listPparams=vector.position.in.lspPs,
  +   vector.name.in.listPparams=vector.name.in.lspPs,
  +   matrix.name.in.listPparams=matrix.name.in.lspPs)
  > test(res,lspPs)
  [1] TRUE
  > 
  > ## tolistPparams and toMatrixPparams work (specific parameters only)
  > listPparams <-list(shared=numeric(0),specific=sp)
  > 
  > matrixPparams <- panelPomp:::toMatrixPparams(listPparams)
  > vector.position.in.listPparams <- which(sapply(listPparams,is.vector))
  > names.in.vector <- names(listPparams[vector.position.in.listPparams]$shared)
  > vector.name.in.listPparams <- names(listPparams)[vector.position.in.listPparams]
  > matrix.name.in.listPparams <- names(listPparams)[ifelse(vector.position.in.listPparams == 1,2,1)]
  > 
  > res <- panelPomp:::toListPparams(
  +   matrixPparams=matrixPparams,
  +   names.in.vector=names.in.vector,
  +   vector.position.in.listPparams=vector.position.in.listPparams,
  +   vector.name.in.listPparams=vector.name.in.listPparams,
  +   matrix.name.in.listPparams=matrix.name.in.listPparams
  + )
  > test(res,listPparams)
  [1] TRUE
  > 
  > ## tolistPparams and toMatrixPparams work (both)
  > listPparams <- list(shared=sh,specific=sp)
  > 
  > matrixPparams <- panelPomp:::toMatrixPparams(listPparams)
  > vector.position.in.listPparams <- which(sapply(listPparams,is.vector))
  > names.in.vector <- names(listPparams[vector.position.in.listPparams]$shared)
  > vector.name.in.listPparams <- names(listPparams)[vector.position.in.listPparams]
  > matrix.name.in.listPparams <- names(listPparams)[ifelse(vector.position.in.listPparams == 1,2,1)]
  > 
  > res <- panelPomp:::toListPparams(
  +   matrixPparams=matrixPparams,
  +   names.in.vector=names.in.vector,
  +   vector.position.in.listPparams=vector.position.in.listPparams,
  +   vector.name.in.listPparams=vector.name.in.listPparams,
  +   matrix.name.in.listPparams=matrix.name.in.listPparams
  + )
  > test(res,listPparams)
  [1] TRUE
  > 
  > ## check whether all tests passed
  > all(get(eval(formals(test))$all))
  [1] TRUE
  > if (!all(get(eval(formals(test))$all))) stop("Not all tests passed!")
  > 
  > proc.time()
     user  system elapsed 
     0.70    0.18    3.18 
Running the tests in 'tests/print-results.R' failed.
Complete output:
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > ## list examples (avoiding listing package installation folder for R CMD check)
  > ppo <- panelRandomWalk(U=2,N=6)
  > ppo
  <object of class 'panelPomp'>
  panel of 2 units 
  parameter(s):
  $shared
  sigmaX sigmaY 
       1      1 
  
  $specific
       unit
  param rw1 rw2
    X.0   1   1
  
  summary of first panel unit ("rw1"):
  <object of class 'pomp'>
  > lapply(as(ppo,"list"),obs)
  $rw1
      t
  name       [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
     Y -0.8029721 0.5765159 -2.121707 -1.829423 -1.070494 -1.890537
  
  $rw2
      t
  name     [,1]     [,2]     [,3]     [,4]     [,5]      [,6]
     Y 2.864593 1.597069 2.799784 1.024825 2.416252 0.4682343
  
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.65    0.14    2.85 
Running the tests in 'tests/seeded-results.R' failed.
Complete output:
  > # check reproducibility over a range of randomly chosen seeds
  > if (file.exists("_options.R")) source("_options.R")
  > library(panelPomp,quietly=TRUE)
  > 
  > ppo <- panelRandomWalk(U=3,N=4)
  > 
  > seeds <- c(21125715L,81902071L,86680005L,29971689L,73376915L)
  > 
  > for (s in seq_along(seeds)) {
  +   set.seed(seeds[s])
  +   pf <- pfilter(ppo,Np=10)
  +   print(unitlogLik(pf))
  +   print(logLik(pf))
  + }
        rw1       rw2       rw3 
  -9.693242 -7.958418 -5.702933 
  [1] -23.35459
        rw1       rw2       rw3 
  -9.939198 -9.169043 -5.679824 
  [1] -24.78806
        rw1       rw2       rw3 
  -8.860156 -7.318119 -6.049635 
  [1] -22.22791
        rw1       rw2       rw3 
  -7.809090 -8.144534 -5.255597 
  [1] -21.20922
        rw1       rw2       rw3 
  -8.512685 -6.536669 -6.036917 
  [1] -21.08627
  > 
  > for (s in seq_along(seeds)) {
  +   set.seed(seeds[s])
  +   mf <- mif2(ppo,Np=10,rw.sd=rw_sd(sigmaX=0.05,X.0=0.5),
  +              cooling.fraction.50=0.5,cooling.type="geometric")
  +   print(mf@shared)
  +   print(mf@specific)
  +   print(unitlogLik(mf))
  +   print(logLik(mf))
  +   print(traces(mf))
  + }
    sigmaX   sigmaY 
  1.078101 1.000000 
          unit
  variable       rw1       rw2      rw3
       X.0 0.9995142 0.6630938 1.546127
         rw1        rw2        rw3 
  -10.308758  -7.274029  -5.310702 
  [1] -22.89349
           variable
  iteration    loglik   sigmaX sigmaY unitLoglik[rw1]  X.0[rw1] unitLoglik[rw2]
          0 -22.89349 1.000000      1       -10.30876 1.0000000       -7.274029
          1        NA 1.078101      1              NA 0.9995142              NA
           variable
  iteration  X.0[rw2] unitLoglik[rw3] X.0[rw3]
          0 1.0000000       -5.310702 1.000000
          1 0.6630938              NA 1.546127
     sigmaX    sigmaY 
  0.8366933 1.0000000 
          unit
  variable       rw1     rw2      rw3
       X.0 0.1609146 1.56302 1.238118
        rw1       rw2       rw3 
  -8.853153 -8.303707 -5.563768 
  [1] -22.72063
           variable
  iteration    loglik    sigmaX sigmaY unitLoglik[rw1]  X.0[rw1] unitLoglik[rw2]
          0 -22.72063 1.0000000      1       -8.853153 1.0000000       -8.303707
          1        NA 0.8366933      1              NA 0.1609146              NA
           variable
  iteration X.0[rw2] unitLoglik[rw3] X.0[rw3]
          0  1.00000       -5.563768 1.000000
          1  1.56302              NA 1.238118
     sigmaX    sigmaY 
  0.7177845 1.0000000 
          unit
  variable       rw1      rw2      rw3
       X.0 0.3572861 1.608191 1.214683
         rw1        rw2        rw3 
  -10.032511  -8.120632  -5.503718 
  [1] -23.65686
           variable
  iteration    loglik    sigmaX sigmaY unitLoglik[rw1]  X.0[rw1] unitLoglik[rw2]
          0 -23.65686 1.0000000      1       -10.03251 1.0000000       -8.120632
          1        NA 0.7177845      1              NA 0.3572861              NA
           variable
  iteration X.0[rw2] unitLoglik[rw3] X.0[rw3]
          0 1.000000       -5.503718 1.000000
          1 1.608191              NA 1.214683
     sigmaX    sigmaY 
  0.9576311 1.0000000 
          unit
  variable       rw1       rw2      rw3
       X.0 0.2445654 0.6539408 1.133491
        rw1       rw2       rw3 
  -9.367004 -8.050974 -5.949910 
  [1] -23.36789
           variable
  iteration    loglik    sigmaX sigmaY unitLoglik[rw1]  X.0[rw1] unitLoglik[rw2]
          0 -23.36789 1.0000000      1       -9.367004 1.0000000       -8.050974
          1        NA 0.9576311      1              NA 0.2445654              NA
           variable
  iteration  X.0[rw2] unitLoglik[rw3] X.0[rw3]
          0 1.0000000        -5.94991 1.000000
          1 0.6539408              NA 1.133491
     sigmaX    sigmaY 
  0.8674928 1.0000000 
          unit
  variable      rw1      rw2      rw3
       X.0 1.352745 1.253761 1.459401
        rw1       rw2       rw3 
  -9.720848 -6.949583 -5.832371 
  [1] -22.5028
           variable
  iteration   loglik    sigmaX sigmaY unitLoglik[rw1] X.0[rw1] unitLoglik[rw2]
          0 -22.5028 1.0000000      1       -9.720848 1.000000       -6.949583
          1       NA 0.8674928      1              NA 1.352745              NA
           variable
  iteration X.0[rw2] unitLoglik[rw3] X.0[rw3]
          0 1.000000       -5.832371 1.000000
          1 1.253761              NA 1.459401
  > 
  > proc.time()
     user  system elapsed 
     1.26    0.18    3.46