mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 00:23:03 +02:00
(v1.4.0.9046) get_episode
This commit is contained in:
@ -79,7 +79,9 @@ test_that("counts work", {
|
||||
)
|
||||
|
||||
# warning for speed loss
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(count_resistant(as.character(example_isolates$AMC)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(count_resistant(example_isolates$AMC,
|
||||
as.character(example_isolates$GEN)))
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
# how to conduct AMR analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
context("is_new_episode.R")
|
||||
context("episode.R")
|
||||
|
||||
test_that("new episodes work", {
|
||||
skip_on_cran()
|
@ -28,6 +28,7 @@ context("filter_ab_class.R")
|
||||
test_that("ATC-group filtering works", {
|
||||
skip_on_cran()
|
||||
|
||||
library(dplyr)
|
||||
expect_gt(example_isolates %>% filter_ab_class("carbapenem") %>% nrow(), 0)
|
||||
expect_gt(example_isolates %>% filter_aminoglycosides() %>% nrow(), 0)
|
||||
expect_gt(example_isolates %>% filter_carbapenems() %>% nrow(), 0)
|
||||
|
@ -76,11 +76,15 @@ test_that("proportions works", {
|
||||
combination_n = n_rsi(CIP, GEN)) %>%
|
||||
pull(combination_n),
|
||||
c(305, 617, 241, 711))
|
||||
|
||||
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_R(as.character(example_isolates$AMC)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_S(as.character(example_isolates$AMC)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_S(as.character(example_isolates$AMC,
|
||||
example_isolates$GEN)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(n_rsi(as.character(example_isolates$AMC,
|
||||
example_isolates$GEN)))
|
||||
expect_equal(suppressWarnings(n_rsi(as.character(example_isolates$AMC,
|
||||
@ -105,8 +109,11 @@ test_that("proportions works", {
|
||||
NA_real_)
|
||||
|
||||
# warning for speed loss
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_R(as.character(example_isolates$GEN)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_I(as.character(example_isolates$GEN)))
|
||||
reset_all_thrown_messages()
|
||||
expect_warning(proportion_S(example_isolates$AMC, as.character(example_isolates$GEN)))
|
||||
|
||||
# proportion_df
|
||||
|
Reference in New Issue
Block a user