mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:11:54 +02:00
few extra tests
This commit is contained in:
@ -51,6 +51,7 @@ test_that("frequency table works", {
|
||||
expect_output(septic_patients %>% select(1:7) %>% freq() %>% print())
|
||||
expect_output(septic_patients %>% select(1:8) %>% freq() %>% print())
|
||||
expect_output(septic_patients %>% select(1:9) %>% freq() %>% print())
|
||||
expect_output(print(freq(septic_patients$age), nmax = 20))
|
||||
|
||||
# top 5
|
||||
expect_equal(
|
||||
|
@ -23,9 +23,18 @@ test_that("joins work", {
|
||||
expect_true(nrow(unjoined) < nrow(right))
|
||||
expect_true(nrow(unjoined) < nrow(full))
|
||||
|
||||
|
||||
expect_equal(nrow(inner_join_microorganisms("ESCCOL")), 1)
|
||||
expect_equal(nrow(inner_join_microorganisms("ESCCOL", by = c("bactid" = "bactid"))), 1)
|
||||
expect_warning(inner_join_microorganisms("Escherichia", by = c("bactid" = "genus")))
|
||||
|
||||
expect_equal(nrow(left_join_microorganisms("ESCCOL")), 1)
|
||||
expect_warning(left_join_microorganisms("Escherichia", by = c("bactid" = "genus")))
|
||||
|
||||
expect_equal(nrow(semi_join_microorganisms("ESCCOL")), 1)
|
||||
expect_equal(nrow(anti_join_microorganisms("ESCCOL")), 0)
|
||||
|
||||
eexpect_warning(right_join_microorganisms("ESCCOL"))
|
||||
eexpect_warning(full_join_microorganisms("ESCCOL"))
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user