tests/testthat/_problems/test_bases-26.R

# Extracted from test_bases.R:26

# setup ------------------------------------------------------------------------
library(testthat)
test_env <- simulate_test_env(package = "DistributionalDDA", path = "..")
attach(test_env, warn.conflicts = FALSE)

# test -------------------------------------------------------------------------
X=c("A","B")
rmd = ReferenceMeasureDiscrete(X,c(0.2,0.3))
basis = BayesSpaceBasis(rmd)
SIGMA = scalarProductOfLogDensities(basis,basis,rmd)
expect_lt(sum(abs(SIGMA-1)),1E-14)
expect_equal(c(basis$A %*% rmd$w),rep(0,nrow(basis$A)),tolerance=1E-14)

Try the DistributionalDDA package in your browser

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

DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.