tests/testthat/test_whiten_draws.R

test_that("whiten draws returns expected structure", {

  ex_drw <- posterior::example_draws()

  w_drw <- whiten_draws(ex_drw)

  expect_s3_class(w_drw, "whitened_draws")
  expect_s3_class(w_drw, "draws")

  expect_equal(names(attributes(w_drw)),
               c("names", "row.names", "class", "loadings"))

  expect_true(is.matrix(attr(w_drw, "loadings")))
}
)

Try the priorsense package in your browser

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

priorsense documentation built on Nov. 6, 2025, 1:09 a.m.