tests/testthat/test-collapse-chains.R

test_that("collapse_chains", {
  x <- subset(mcmcr::mcmcr_example, iters = 1:3)
  expect_s3_class(collapse_chains(coda::as.mcmc.list(x)), "mcmc.list")
  expect_identical(nchains(collapse_chains(as.mcmc.list(mcmcr_example))), 1L)
  expect_identical(nchains(collapse_chains(mcmcr_example)), 1L)
  expect_identical(nchains(collapse_chains(mcmcr_example2)), 1L)
})

Try the mcmcr package in your browser

Any scripts or data that you put into this service are public.

mcmcr documentation built on Sept. 7, 2021, 1:07 a.m.