mirror of
https://github.com/msberends/AMR.git
synced 2025-04-21 18:03:54 +02:00
Compare commits
No commits in common. "8deaf2c8eb039d5302a752b7f03ea19a8bec34d9" and "d147d6602dbad4d9d2a079162a52168d9f8b3c44" have entirely different histories.
8deaf2c8eb
...
d147d6602d
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9224
|
||||
Version: 2.1.1.9222
|
||||
Date: 2025-03-20
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
S3method("!=",amr_selector)
|
||||
S3method("&",amr_selector)
|
||||
S3method("+",ab)
|
||||
S3method("+",amr_selector)
|
||||
S3method("==",amr_selector)
|
||||
S3method("[",ab)
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 2.1.1.9224
|
||||
# AMR 2.1.1.9222
|
||||
|
||||
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)*
|
||||
|
||||
|
@ -539,7 +539,7 @@ word_wrap <- function(...,
|
||||
)
|
||||
# text starting with `?` must also lead to the help page
|
||||
parts[parts %like% "^[?]"] <- font_url(
|
||||
url = paste0("ide:help:AMR::", gsub("?", "", parts[parts %like% "^[?]"], fixed = TRUE)),
|
||||
url = paste0("ide:help:AMR::", parts[parts %like% "^[?]"]),
|
||||
txt = parts[parts %like% "^[?]"]
|
||||
)
|
||||
msg <- paste0(parts, collapse = "`")
|
||||
|
10
R/ab.R
10
R/ab.R
@ -610,16 +610,6 @@ rep.ab <- function(x, ...) {
|
||||
y
|
||||
}
|
||||
|
||||
#' @method + ab
|
||||
#' @export
|
||||
#' @noRd
|
||||
`+.ab` <- function(e1, e2) {
|
||||
# this does not return ab class, it should just allow console usage of e.g., carbapenems() + c("", aminoglycosides())
|
||||
out <- as.character(outer(e1, e2, paste, sep = " + "))
|
||||
out <- gsub(" [+] $", "", out)
|
||||
out
|
||||
}
|
||||
|
||||
generalise_antibiotic_name <- function(x) {
|
||||
x <- toupper(x)
|
||||
# remove suffices
|
||||
|
@ -954,10 +954,9 @@ any.amr_selector_any_all <- function(..., na.rm = FALSE) {
|
||||
#' @noRd
|
||||
`+.amr_selector` <- function(e1, e2) {
|
||||
# this is useful for `antibiogram()`: antibiogram(example_isolates, carbapenems() + c("", "GEN", "TOB"))
|
||||
# this is also implemented for ab class, to allow direct console usage
|
||||
out <- as.character(outer(e1, e2, paste, sep = " + "))
|
||||
out <- gsub(" [+] $", "", out)
|
||||
structure(out, class = c("amr_selector", "character"))
|
||||
structure(as.character(outer(e1, e2, paste, sep = " + ")),
|
||||
class = c("amr_selector", "character")
|
||||
)
|
||||
}
|
||||
|
||||
is_any <- function(el1) {
|
||||
|
@ -42,9 +42,8 @@
|
||||
#' - `c(aminoglycosides(), "AMP", "AMC")`
|
||||
#' - `c(aminoglycosides(), carbapenems())`
|
||||
#' - Combination therapy, indicated by using `"+"`, with or without [antimicrobial selectors][antimicrobial_selectors], e.g.:
|
||||
#' - `"cipro + genta"`
|
||||
#' - `"TZP+TOB"`
|
||||
#' - `c("TZP", "TZP+GEN", "TZP+TOB")`
|
||||
#' - `"cipro + genta"`
|
||||
#' - `carbapenems() + "GEN"`
|
||||
#' - `carbapenems() + c("", "GEN")`
|
||||
#' - `carbapenems() + c("", aminoglycosides())`
|
||||
|
@ -73,23 +73,26 @@ if not isinstalled('AMR', lib_loc=r_lib_path):
|
||||
print(f"AMR: Installing latest AMR R package to {r_lib_path}...", flush=True)
|
||||
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
||||
|
||||
# # Retrieve Python AMR version
|
||||
# try:
|
||||
# python_amr_version = metadata.version('AMR')
|
||||
# except metadata.PackageNotFoundError:
|
||||
# python_amr_version = ''
|
||||
#
|
||||
# # Retrieve R AMR version
|
||||
# r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))')
|
||||
# r_amr_version = str(r_amr_version[0])
|
||||
#
|
||||
# # Compare R and Python package versions
|
||||
# if r_amr_version != python_amr_version:
|
||||
# try:
|
||||
# print(f"AMR: Updating AMR package in {r_lib_path}...", flush=True)
|
||||
# utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
||||
# except Exception as e:
|
||||
# print(f"AMR: Could not update: {e}", flush=True)
|
||||
# Retrieve Python AMR version
|
||||
try:
|
||||
python_amr_version = metadata.version('AMR')
|
||||
except metadata.PackageNotFoundError:
|
||||
python_amr_version = ''
|
||||
|
||||
# Retrieve R AMR version
|
||||
r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))')
|
||||
r_amr_version = str(r_amr_version[0])
|
||||
|
||||
print(python_amr_version)
|
||||
print(r_amr_version)
|
||||
|
||||
# Compare R and Python package versions
|
||||
if r_amr_version != python_amr_version:
|
||||
try:
|
||||
print(f"AMR: Updating AMR package in {r_lib_path}...", flush=True)
|
||||
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
|
||||
except Exception as e:
|
||||
print(f"AMR: Could not update: {e}", flush=True)
|
||||
|
||||
print(f"AMR: Setting up R environment and AMR datasets...", flush=True)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
|
||||
|
||||
First and foremost, you are trained on version 2.1.1.9224. Remember this whenever someone asks which AMR package version you’re at.
|
||||
First and foremost, you are trained on version 2.1.1.9222. Remember this whenever someone asks which AMR package version you’re at.
|
||||
|
||||
Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
@ -13,7 +13,6 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'NAMESPACE':
|
||||
|
||||
S3method("!=",amr_selector)
|
||||
S3method("&",amr_selector)
|
||||
S3method("+",ab)
|
||||
S3method("+",amr_selector)
|
||||
S3method("==",amr_selector)
|
||||
S3method("[",ab)
|
||||
@ -1714,9 +1713,8 @@ retrieve_wisca_parameters(wisca_model, ...)
|
||||
}
|
||||
\item Combination therapy, indicated by using \code{"+"}, with or without \link[=antimicrobial_selectors]{antimicrobial selectors}, e.g.:
|
||||
\itemize{
|
||||
\item \code{"cipro + genta"}
|
||||
\item \code{"TZP+TOB"}
|
||||
\item \code{c("TZP", "TZP+GEN", "TZP+TOB")}
|
||||
\item \code{"cipro + genta"}
|
||||
\item \code{carbapenems() + "GEN"}
|
||||
\item \code{carbapenems() + c("", "GEN")}
|
||||
\item \code{carbapenems() + c("", aminoglycosides())}
|
@ -58,9 +58,8 @@ retrieve_wisca_parameters(wisca_model, ...)
|
||||
}
|
||||
\item Combination therapy, indicated by using \code{"+"}, with or without \link[=antimicrobial_selectors]{antimicrobial selectors}, e.g.:
|
||||
\itemize{
|
||||
\item \code{"cipro + genta"}
|
||||
\item \code{"TZP+TOB"}
|
||||
\item \code{c("TZP", "TZP+GEN", "TZP+TOB")}
|
||||
\item \code{"cipro + genta"}
|
||||
\item \code{carbapenems() + "GEN"}
|
||||
\item \code{carbapenems() + c("", "GEN")}
|
||||
\item \code{carbapenems() + c("", aminoglycosides())}
|
||||
|
BIN
man/figures/mo_matching_score.png
Normal file
BIN
man/figures/mo_matching_score.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-_deprecated.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_warning(example_isolates[, ab_class("mycobact")])
|
||||
expect_warning(example_isolates[, ab_selector(name %like% "trim")])
|
||||
})
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-misc.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(AMR:::percentage(0.25), "25%")
|
||||
expect_equal(AMR:::percentage(0.5), "50%")
|
||||
expect_equal(AMR:::percentage(0.500, digits = 1), "50.0%")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-ab.R", {
|
||||
skip_on_cran()
|
||||
|
||||
ab_reset_session()
|
||||
|
||||
expect_equal(
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-ab_from_text.R", {
|
||||
skip_on_cran()
|
||||
|
||||
ab_reset_session()
|
||||
|
||||
expect_identical(
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-ab_property.R", {
|
||||
skip_on_cran()
|
||||
|
||||
ab_reset_session()
|
||||
|
||||
expect_identical(ab_name("AMX", language = NULL), "Amoxicillin")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-age.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(
|
||||
age(
|
||||
x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-amr selectors.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# antibiotic class selectors
|
||||
expect_equal(ncol(example_isolates[, aminoglycosides(), drop = FALSE]), 4, tolerance = 0.5)
|
||||
expect_equal(ncol(example_isolates[, aminopenicillins(), drop = FALSE]), 2, tolerance = 0.5)
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-antibiogram.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# Traditional antibiogram ----------------------------------------------
|
||||
|
||||
ab1 <- antibiogram(example_isolates,
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-atc_online.R", {
|
||||
skip_on_cran()
|
||||
|
||||
if (AMR:::pkg_is_available("curl") &&
|
||||
AMR:::pkg_is_available("rvest") &&
|
||||
AMR:::pkg_is_available("xml2") &&
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-av.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(
|
||||
as.character(as.av(c(
|
||||
"J05AB01",
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-av_from_text.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(
|
||||
av_from_text("28/03/2020 regular aciclovir 500mg po tds")[[1]],
|
||||
as.av("Aciclovir")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-ab_property.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(av_name("ACI", language = NULL), "Aciclovir")
|
||||
expect_identical(av_atc("ACI"), "J05AB01")
|
||||
expect_identical(av_cid("ACI"), as.integer(135398513))
|
||||
|
@ -28,7 +28,5 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-availibility.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_inherits(availability(example_isolates), "data.frame")
|
||||
})
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-bug/drug.R", {
|
||||
skip_on_cran()
|
||||
|
||||
b <- suppressWarnings(bug_drug_combinations(example_isolates))
|
||||
expect_inherits(b, "bug_drug_combinations")
|
||||
expect_output(suppressMessages(print(b)))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-count.R", {
|
||||
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_sir(example_isolates$AMX))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-custom ab.R", {
|
||||
skip_on_cran()
|
||||
|
||||
ab_reset_session()
|
||||
|
||||
expect_message(as.ab("testab", info = TRUE))
|
||||
|
@ -29,8 +29,6 @@
|
||||
|
||||
|
||||
test_that("test-custom mo.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(
|
||||
as.mo("Enterobacter asburiae/cloacae"),
|
||||
as.mo("Enterobacter asburiae")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-data.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# IDs should always be unique
|
||||
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
|
||||
expect_identical(class(microorganisms$mo), c("mo", "character"))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-disk.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_true(as.disk(8) == as.disk("8"))
|
||||
expect_true(is.disk(as.disk(8)))
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-eucast_rules.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# thoroughly check input table
|
||||
expect_equal(
|
||||
colnames(AMR:::EUCAST_RULES_DF),
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-first_isolate.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# all four methods
|
||||
expect_equal(
|
||||
sum(first_isolate(x = example_isolates, method = "isolate-based", info = TRUE), na.rm = TRUE),
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-g.test.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# GOODNESS-OF-FIT
|
||||
|
||||
# example 1: clearfield rice vs. red rice
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-get_episode.R", {
|
||||
skip_on_cran()
|
||||
|
||||
x <- data.frame(dates = as.Date(c("2021-01-01", "2021-01-02", "2021-01-05", "2021-01-08", "2021-02-21", "2021-02-22", "2021-02-23", "2021-02-24", "2021-03-01", "2021-03-01")))
|
||||
x$absolute <- get_episode(x$dates, episode_days = 7)
|
||||
x$relative <- get_episode(x$dates, case_free_days = 7)
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-ggplot_sir.R", {
|
||||
skip_on_cran()
|
||||
|
||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE) &&
|
||||
AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-guess_ab_col.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(
|
||||
guess_ab_col(example_isolates, "amox"),
|
||||
"AMX"
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-italicise_taxonomy.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(
|
||||
italicise_taxonomy("test for E. coli"),
|
||||
"test for *E. coli*"
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-join_microorganisms.R", {
|
||||
skip_on_cran()
|
||||
|
||||
unjoined <- example_isolates
|
||||
inner <- inner_join_microorganisms(example_isolates)
|
||||
left <- left_join_microorganisms(example_isolates)
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-key_antimicrobials.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(length(key_antimicrobials(example_isolates, antifungal = NULL)), nrow(example_isolates))
|
||||
expect_false(all(is.na(key_antimicrobials(example_isolates, antifungal = NULL))))
|
||||
expect_true(antimicrobials_equal("SSS", "SSS", type = "points"))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-kurtosis.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(kurtosis(example_isolates$age),
|
||||
5.227999,
|
||||
tolerance = 0.00001
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-like.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_true(sum("test" %like% c("^t", "^s")) == 1)
|
||||
|
||||
expect_true("test" %like% "test")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-mdro.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_error(mdro(example_isolates, guideline = c("BRMO", "MRGN"), info = TRUE))
|
||||
expect_error(mdro(example_isolates, col_mo = "invalid", info = TRUE))
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-mean_amr_distance.R", {
|
||||
skip_on_cran()
|
||||
|
||||
vctr_disk <- as.disk(c(20:25))
|
||||
vctr_mic <- as.mic(2^c(0:5))
|
||||
vctr_sir <- as.sir(c("S", "S", "I", "I", "R", "R"))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-mic.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# used in multiple functions, also in plotting
|
||||
expect_true(all(as.mic(AMR:::COMMON_MIC_VALUES) %in% AMR:::VALID_MIC_LEVELS))
|
||||
expect_true(all(paste0("<=", as.mic(AMR:::COMMON_MIC_VALUES)) %in% AMR:::VALID_MIC_LEVELS))
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-mo.R", {
|
||||
skip_on_cran()
|
||||
|
||||
MOs <- subset(microorganisms, !is.na(mo) & nchar(mo) > 3)
|
||||
expect_identical(as.character(MOs$mo), as.character(as.mo(MOs$mo, keep_synonyms = TRUE)))
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-mo_property.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
|
||||
expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
|
||||
expect_equal(mo_phylum("Escherichia coli"), "Pseudomonadota")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-pca.R", {
|
||||
skip_on_cran()
|
||||
|
||||
resistance_data <- structure(
|
||||
list(
|
||||
order = c("Bacillales", "Enterobacterales", "Enterobacterales"),
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-plotting.R", {
|
||||
skip_on_cran()
|
||||
|
||||
if (AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-proportion.R", {
|
||||
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))
|
||||
# AMX resistance in `example_isolates`
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-random.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_inherits(random_mic(100), "mic")
|
||||
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae"), "mic")
|
||||
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae", ab = "meropenem"), "mic")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-resistance_predict.R", {
|
||||
skip_on_cran()
|
||||
|
||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
|
||||
expect_output(AMX_R <- example_isolates %>%
|
||||
filter(mo == "B_ESCHR_COLI") %>%
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-sir.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# Existing SIR ------------------------------------------------------------
|
||||
|
||||
# we must only have EUCAST and CLSI, because otherwise the rules in as.sir() will fail
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-skewness.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(skewness(example_isolates$age),
|
||||
-1.212888,
|
||||
tolerance = 0.00001
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-top_n_microorganisms.R", {
|
||||
skip_on_cran()
|
||||
|
||||
out1 <- top_n_microorganisms(example_isolates, n = 3)
|
||||
out2 <- top_n_microorganisms(example_isolates, n = 5, property = "genus")
|
||||
out3 <- top_n_microorganisms(example_isolates, n = 5, property = "genus", n_for_each = 3)
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-translate.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_identical(mo_genus("B_GRAMP", language = "pt"), "(gênero desconhecido)")
|
||||
|
||||
expect_identical(mo_fullname("CoNS", "cs"), "Koaguláza-negativní stafylokok (KNS)")
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-vctrs.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# extra tests for {vctrs} pkg support
|
||||
if (AMR:::pkg_is_available("tibble")) {
|
||||
test <- tibble::tibble(
|
||||
|
@ -28,8 +28,6 @@
|
||||
# ==================================================================== #
|
||||
|
||||
test_that("test-zzz.R", {
|
||||
skip_on_cran()
|
||||
|
||||
# Check if these functions still exist in their package (all are in Suggests field)
|
||||
# Since GitHub Actions runs every night, we will get emailed when a dependency fails based on this unit test
|
||||
|
||||
|
@ -43,7 +43,6 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
|
||||
code
|
||||
}
|
||||
expect_output <- tinytest::expect_stdout
|
||||
skip_on_cran <- function() invisible(NULL)
|
||||
|
||||
# set language
|
||||
set_AMR_locale("English")
|
||||
|
Loading…
x
Reference in New Issue
Block a user