mirror of
https://github.com/msberends/AMR.git
synced 2025-07-18 11:33:18 +02:00
extra unit tests
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
context("freq.R")
|
||||
|
||||
test_that("frequency table works", {
|
||||
expect_equal(nrow(freq(c(1, 1, 2, 2, 3, 3, 4, 4, 5, 5), as.data.frame = TRUE)), 5)
|
||||
expect_equal(nrow(frequency_tbl(c(1, 1, 2, 2, 3, 3, 4, 4, 5, 5), as.data.frame = TRUE)), 5)
|
||||
expect_equal(nrow(freq(c(1, 1, 2, 2, 3, 3, 4, 4, 5, 5))), 5)
|
||||
expect_equal(nrow(frequency_tbl(c(1, 1, 2, 2, 3, 3, 4, 4, 5, 5))), 5)
|
||||
|
||||
# date column of septic_patients should contain 1662 unique dates
|
||||
expect_equal(nrow(freq(septic_patients$date, as.data.frame = TRUE)), 1662)
|
||||
expect_equal(nrow(freq(septic_patients$date, as.data.frame = TRUE)),
|
||||
expect_equal(nrow(freq(septic_patients$date)), 1662)
|
||||
expect_equal(nrow(freq(septic_patients$date)),
|
||||
length(unique(septic_patients$date)))
|
||||
|
||||
# int
|
||||
|
Reference in New Issue
Block a user