tests/testthat/test_sort_component_labels.R

context("Order component labels")

test_that("ordered_thetas", {
  expect_true(isOrdered(MultiBatchModelExample))
  theta(MultiBatchModelExample)[1, 3] <- -5
  expect_false(isOrdered(MultiBatchModelExample))
  bmodel <- sortComponentLabels(MultiBatchModelExample)
  expect_true(isOrdered(bmodel))
})

Try the CNPBayes package in your browser

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

CNPBayes documentation built on May 6, 2019, 4:06 a.m.