library(TestGardener)
test_that("sum score gives correct optimal score", {
load("../../data/NatMath_fittedmodel.RData")
res <- sumScoreToOptimalScore(11.929263, AnalyzeResult$parList[[10]]$WfdList,
NatMath_dataList$optList, verbose = T)
res2 <- sumScoreToOptimalScore(1, AnalyzeResult$parList[[10]]$WfdList,
NatMath_dataList$optList, verbose = T)
res3 <- sumScoreToOptimalScore(99, AnalyzeResult$parList[[10]]$WfdList,
NatMath_dataList$optList, verbose = T)
expect_equal(c(round(res, digits = 3), res2, res3), c(5.106, 0, 100))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.