1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 09:41:57 +02:00

add unit tests

This commit is contained in:
2018-07-17 11:18:36 +02:00
parent a5a4354651
commit 967ee86757
2 changed files with 53 additions and 4 deletions

View File

@ -18,6 +18,7 @@ test_that("G-test works", {
expected = 0.01787343,
tolerance = 0.00000001)
# INDEPENDENCE
x <- matrix(data = round(runif(4) * 100000, 0),
@ -26,4 +27,8 @@ test_that("G-test works", {
expect_lt(g.test(x)$p.value,
1)
expect_warning(g.test(x = c(772, 1611, 737),
y = c(780, 1560, 780),
rescale.p = TRUE))
})