mirror of
https://github.com/msberends/AMR.git
synced 2025-07-11 20:21:55 +02:00
add unit tests
This commit is contained in:
@ -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))
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user