1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 07:01:57 +02:00

(v2.1.1.9049) new 2024 breakpoints, add AMO, set NI instead of N

This commit is contained in:
2024-06-14 22:39:01 +02:00
parent de17de1be9
commit 9bf7584d58
57 changed files with 4375 additions and 135 deletions

View File

@ -45,12 +45,12 @@ expect_inherits(x[[1]], "sir")
expect_inherits(c(x[1], x[9]), "sir")
expect_inherits(unique(x[1], x[9]), "sir")
pdf(NULL) # prevent Rplots.pdf being created
expect_silent(barplot(as.sir(c("S", "SDD", "I", "R", "N"))))
expect_silent(plot(as.sir(c("S", "SDD", "I", "R", "N"))))
expect_silent(barplot(as.sir(c("S", "SDD", "I", "R", "NI"))))
expect_silent(plot(as.sir(c("S", "SDD", "I", "R", "NI"))))
if (AMR:::pkg_is_available("ggplot2")) {
expect_inherits(ggplot2::autoplot(as.sir(c("S", "SDD", "I", "R", "N"))), "gg")
expect_inherits(ggplot2::autoplot(as.sir(c("S", "SDD", "I", "R", "NI"))), "gg")
}
expect_stdout(print(as.sir(c("S", "SDD", "I", "R", "N"))))
expect_stdout(print(as.sir(c("S", "SDD", "I", "R", "NI"))))
expect_equal(as.character(as.sir(c(1:3))), c("S", "I", "R"))
expect_equal(as.character(as.sir(c(1:3))), c("S", "I", "R"))
expect_equal(suppressWarnings(as.logical(as.sir("INVALID VALUE"))), NA)
@ -62,7 +62,7 @@ expect_equal(
"%SDD" = " 0.0% (n=0)",
"%I" = " 0.0% (n=0)",
"%R" = "50.0% (n=1)",
"%N" = " 0.0% (n=0)"
"%NI" = " 0.0% (n=0)"
), class = c("summaryDefault", "table"))
)
expect_identical(
@ -276,7 +276,7 @@ expect_inherits(
expect_inherits(
suppressWarnings(as.sir(data.frame(
mo = "Escherichia coli",
amoxi = c("S", "SDD", "I", "R", "N", "invalid")
amoxi = c("S", "SDD", "I", "R", "NI", "invalid")
))$amoxi),
"sir"
)