tests/testthat/test_Example1.R

library(metaggR)

E1 = c(50, 134, 206, 290, 326, 374)
P1 = c(26, 92, 116, 218, 218, 206)
out1 = round(knowledge_weighted_estimate(E1,P1), 4)

E2 = c(50, 134, 206, 290, 326, 374, 200)
P2 = c(26, 92, 116, 218, 218, 206, 200)
out2 = round(knowledge_weighted_estimate(E2,P2), 4)

test_that("Expected output is found",
          {
            expect_equal(out1, 329.305)
            expect_equal(out2, 314.8606)
          })

Try the metaggR package in your browser

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

metaggR documentation built on April 25, 2022, 5:06 p.m.