tests/testthat/test-unit-sucra.R

context("sucra")

test_that("SUCRA is implemented correctly", {
  ranks <- matrix(c(1/4, 1/4, 1/4, 1/4, 1/2, 1/4, 1/4, 0, 1/4, 1/2, 1/4, 0, 0, 0, 1/4, 3/4), nrow=4, byrow=TRUE, dimnames=list(c("A", "B", "C", "D"), NULL))
  expect_equal(sucra(ranks), c(A=1/2, B=3/4, C=2/3, D=1/12))
})

Try the gemtc package in your browser

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

gemtc documentation built on July 9, 2023, 5:33 p.m.