add unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2018-07-17 11:18:36 +02:00
1 parent a5a4354651
commit 967ee86757
2 files changed
+53 -4

No files matched your search

+5
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))
})