tests/testthat/test-as-mcmc.R

test_that("as.mcmc", {
  expect_error(coda::as.mcmc(mcmcr_example$alpha),
    "^`nchains\\(x\\)` must be identical to 1L\\.",
    class = "chk_error"
  )

  expect_s3_class(
    as.mcmc(as.mcarray(coda::as.mcmc.list(collapse_chains(mcmcr_example[[1]])))),
    "mcmc"
  )
})

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.