mirror of
https://github.com/msberends/AMR.git
synced 2025-01-24 04:24:34 +01:00
unit tests
This commit is contained in:
parent
da5379c881
commit
8ab93b6688
@ -52,7 +52,7 @@ Imports:
|
||||
xml2 (>= 1.0.0),
|
||||
knitr (>= 1.0.0),
|
||||
readr,
|
||||
rlang,
|
||||
rlang (>= 0.2.0),
|
||||
rvest (>= 0.3.2)
|
||||
Suggests:
|
||||
testthat (>= 1.0.2),
|
||||
|
2
NEWS.md
2
NEWS.md
@ -6,7 +6,7 @@
|
||||
|
||||
#### Changed
|
||||
* Added parameters `minimum` and `as_percent` to `portion_df`
|
||||
* Support for quasiquotation in the functions series `count_*` and `portions_*`, and `n_rsi`. This allow to check for more than 2 vectors or columns.
|
||||
* Support for quasiquotation in the functions series `count_*` and `portions_*`, and `n_rsi`. This allows to check for more than 2 vectors or columns.
|
||||
* `septic_patients %>% select(amox, cipr) %>% count_R()`
|
||||
* `septic_patients %>% portion_S(amcl)`
|
||||
* `septic_patients %>% portion_S(amcl, gent)`
|
||||
|
@ -22,6 +22,9 @@ test_that("counts work", {
|
||||
pull(combination),
|
||||
c(192, 440, 184, 474))
|
||||
|
||||
expect_equal(septic_patients %>% select(amox, cipr) %>% count_df(translate_ab = "official") %>% nrow(),
|
||||
6)
|
||||
|
||||
# warning for speed loss
|
||||
expect_warning(count_R(as.character(septic_patients$amcl)))
|
||||
expect_warning(count_I(as.character(septic_patients$amcl)))
|
||||
|
Loading…
Reference in New Issue
Block a user