tests/testthat/test-bind-dimensions-n.R

test_that("bind_dimensions_n.mcmcarray", {
  expect_identical(bind_dimensions_n(mcmcr_example$beta), mcmcr_example$beta)
  expect_identical(
    pdims(bind_dimensions_n(mcmcr_example$beta, mcmcr_example$beta, mcmcr_example$beta)),
    c(2L, 2L, 3L)
  )
})

test_that("bind_dimensions_n.mcmcr", {
  expect_identical(bind_dimensions_n(mcmcr_example), mcmcr_example)
  expect_identical(
    pdims(bind_dimensions_n(mcmcr_example, mcmcr_example, mcmcr_example)),
    list(alpha = c(2L, 3L), beta = c(2L, 2L, 3L), sigma = c(1L, 3L))
  )
})

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.