mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 11:11:54 +02:00
(v1.3.0) small fixes
This commit is contained in:
@ -22,6 +22,9 @@
|
||||
context("ab.R")
|
||||
|
||||
test_that("as.ab works", {
|
||||
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(as.character(as.ab(c("J01FA01",
|
||||
"J 01 FA 01",
|
||||
"Erythromycin",
|
||||
|
@ -22,7 +22,9 @@
|
||||
context("ab_property.R")
|
||||
|
||||
test_that("ab_property works", {
|
||||
|
||||
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(ab_name("AMX"), "Amoxicillin")
|
||||
expect_identical(as.character(ab_atc("AMX")), "J01CA04")
|
||||
expect_identical(ab_cid("AMX"), as.integer(33613))
|
||||
|
@ -23,6 +23,8 @@ context("count.R")
|
||||
|
||||
test_that("counts work", {
|
||||
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(count_resistant(example_isolates$AMX), count_R(example_isolates$AMX))
|
||||
expect_equal(count_susceptible(example_isolates$AMX), count_SI(example_isolates$AMX))
|
||||
expect_equal(count_all(example_isolates$AMX), n_rsi(example_isolates$AMX))
|
||||
|
@ -22,6 +22,9 @@
|
||||
context("pca.R")
|
||||
|
||||
test_that("PCA works", {
|
||||
|
||||
skip_on_cran()
|
||||
|
||||
resistance_data <- structure(list(order = c("Bacillales", "Enterobacterales", "Enterobacterales"),
|
||||
genus = c("Staphylococcus", "Escherichia", "Klebsiella"),
|
||||
AMC = c(0.00425, 0.13062, 0.10344),
|
||||
|
@ -22,6 +22,9 @@
|
||||
context("proportion.R")
|
||||
|
||||
test_that("proportions works", {
|
||||
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(proportion_R(example_isolates$AMX), resistance(example_isolates$AMX))
|
||||
expect_equal(proportion_SI(example_isolates$AMX), susceptibility(example_isolates$AMX))
|
||||
|
||||
|
Reference in New Issue
Block a user