mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 17:21:49 +02:00
edited g.test
This commit is contained in:
@ -48,10 +48,12 @@ test_that("G-test works", {
|
||||
x <- as.data.frame(
|
||||
matrix(data = round(runif(4) * 100000, 0),
|
||||
ncol = 2,
|
||||
|
||||
byrow = TRUE)
|
||||
)
|
||||
expect_lt(g.test(x)$p.value,
|
||||
|
||||
# fisher.test() is always better for 2x2 tables:
|
||||
expect_warning(g.test(x))
|
||||
expect_lt(suppressWarnings(g.test(x)$p.value),
|
||||
1)
|
||||
|
||||
expect_warning(g.test(x = c(772, 1611, 737),
|
||||
|
Reference in New Issue
Block a user