mirror of
https://github.com/msberends/AMR.git
synced 2025-04-19 08:33:49 +02:00
(v2.1.1.9199) fix eucast
This commit is contained in:
parent
e134e01418
commit
58d7aa8790
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9198
|
Version: 2.1.1.9199
|
||||||
Date: 2025-03-14
|
Date: 2025-03-14
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.1.1.9198
|
# AMR 2.1.1.9199
|
||||||
|
|
||||||
*(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).)*
|
*(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).)*
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.2
|
Metadata-Version: 2.2
|
||||||
Name: AMR
|
Name: AMR
|
||||||
Version: 2.1.1.9198
|
Version: 2.1.1.9199
|
||||||
Summary: A Python wrapper for the AMR R package
|
Summary: A Python wrapper for the AMR R package
|
||||||
Home-page: https://github.com/msberends/AMR
|
Home-page: https://github.com/msberends/AMR
|
||||||
Author: Matthijs Berends
|
Author: Matthijs Berends
|
||||||
|
BIN
PythonPackage/AMR/dist/amr-2.1.1.9198.tar.gz
vendored
BIN
PythonPackage/AMR/dist/amr-2.1.1.9198.tar.gz
vendored
Binary file not shown.
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9199.tar.gz
vendored
Normal file
BIN
PythonPackage/AMR/dist/amr-2.1.1.9199.tar.gz
vendored
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='AMR',
|
name='AMR',
|
||||||
version='2.1.1.9198',
|
version='2.1.1.9199',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'rpy2',
|
'rpy2',
|
||||||
|
@ -532,9 +532,14 @@ word_wrap <- function(...,
|
|||||||
url = paste0("ide:run:AMR::", parts[cmds & parts %unlike% "[.]"]),
|
url = paste0("ide:run:AMR::", parts[cmds & parts %unlike% "[.]"]),
|
||||||
txt = parts[cmds & parts %unlike% "[.]"]
|
txt = parts[cmds & parts %unlike% "[.]"]
|
||||||
)
|
)
|
||||||
|
# datasets should give help page as well
|
||||||
|
parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")] <- font_url(
|
||||||
|
url = paste0("ide:help:AMR::", gsub("()", "", parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")], fixed = TRUE)),
|
||||||
|
txt = parts[parts %in% c("antimicrobials", "microorganisms", "microorganisms.codes", "microorganisms.groups")]
|
||||||
|
)
|
||||||
# text starting with `?` must also lead to the help page
|
# text starting with `?` must also lead to the help page
|
||||||
parts[parts %like% "^[?]"] <- font_url(
|
parts[parts %like% "^[?]"] <- font_url(
|
||||||
url = paste0("ide:help:AMR::", gsub("()", "", gsub("^[?]", "", parts[parts %like% "^[?]"]), fixed = TRUE)),
|
url = paste0("ide:help:AMR::", parts[parts %like% "^[?]"]),
|
||||||
txt = parts[parts %like% "^[?]"]
|
txt = parts[parts %like% "^[?]"]
|
||||||
)
|
)
|
||||||
msg <- paste0(parts, collapse = "`")
|
msg <- paste0(parts, collapse = "`")
|
||||||
|
9
R/mo.R
9
R/mo.R
@ -242,7 +242,14 @@ as.mo <- function(x,
|
|||||||
# one exception: "Fungi" matches the kingdom, but instead it should return the 'unknown' code for fungi
|
# one exception: "Fungi" matches the kingdom, but instead it should return the 'unknown' code for fungi
|
||||||
out[out == "F_[KNG]_FUNGI"] <- "F_FUNGUS"
|
out[out == "F_[KNG]_FUNGI"] <- "F_FUNGUS"
|
||||||
# From known codes ----
|
# From known codes ----
|
||||||
out[is.na(out) & toupper(x) %in% AMR::microorganisms.codes$code] <- AMR::microorganisms.codes$mo[match(toupper(x)[is.na(out) & toupper(x) %in% AMR::microorganisms.codes$code], AMR::microorganisms.codes$code)]
|
ind <- is.na(out) & toupper(x) %in% AMR::microorganisms.codes$code
|
||||||
|
out[ind] <- AMR::microorganisms.codes$mo[match(toupper(x)[ind], AMR::microorganisms.codes$code)]
|
||||||
|
if (length(which(ind)) > 0 && isTRUE(info) && message_not_thrown_before("as.mo_microorganisms.codes", is.na(out), toupper(x))) {
|
||||||
|
message_(
|
||||||
|
"Retrieved value", ifelse(sum(ind) > 1, "s", ""),
|
||||||
|
" from the `microorganisms.codes` data set for ", vector_and(toupper(x)[ind]), "."
|
||||||
|
)
|
||||||
|
}
|
||||||
# From SNOMED ----
|
# From SNOMED ----
|
||||||
# based on this extremely fast gem: https://stackoverflow.com/a/11002456/4575331
|
# based on this extremely fast gem: https://stackoverflow.com/a/11002456/4575331
|
||||||
snomeds <- unlist(AMR_env$MO_lookup$snomed)
|
snomeds <- unlist(AMR_env$MO_lookup$snomed)
|
||||||
|
24
_pkgdown.yml
24
_pkgdown.yml
@ -65,11 +65,9 @@ home:
|
|||||||
structure: [toc, links, authors]
|
structure: [toc, links, authors]
|
||||||
|
|
||||||
navbar:
|
navbar:
|
||||||
|
structure:
|
||||||
title: "AMR (for R)"
|
title: "AMR (for R)"
|
||||||
left:
|
left:
|
||||||
# - text: "Home"
|
|
||||||
# icon: "fa-home"
|
|
||||||
# href: "index.html"
|
|
||||||
- text: "How to"
|
- text: "How to"
|
||||||
icon: "fa-question-circle"
|
icon: "fa-question-circle"
|
||||||
menu:
|
menu:
|
||||||
@ -100,9 +98,6 @@ navbar:
|
|||||||
- text: "Work with WHONET Data"
|
- text: "Work with WHONET Data"
|
||||||
icon: "fa-globe-americas"
|
icon: "fa-globe-americas"
|
||||||
href: "articles/WHONET.html"
|
href: "articles/WHONET.html"
|
||||||
# - text: "Import Data From SPSS/Stata"
|
|
||||||
# icon: "fa-file-upload"
|
|
||||||
# href: "articles/SPSS.html"
|
|
||||||
- text: "Apply Eucast Rules"
|
- text: "Apply Eucast Rules"
|
||||||
icon: "fa-exchange-alt"
|
icon: "fa-exchange-alt"
|
||||||
href: "articles/EUCAST.html"
|
href: "articles/EUCAST.html"
|
||||||
@ -124,13 +119,16 @@ navbar:
|
|||||||
- text: "Authors"
|
- text: "Authors"
|
||||||
icon: "fa-users"
|
icon: "fa-users"
|
||||||
href: "authors.html"
|
href: "authors.html"
|
||||||
right:
|
right: [search, amrchangelog, amrgit]
|
||||||
- text: "Changelog"
|
components:
|
||||||
icon: "far fa-newspaper"
|
amrchangelog:
|
||||||
href: "news/index.html"
|
icon: fa-newspaper
|
||||||
- text: "Source Code"
|
href: news/index.html
|
||||||
icon: "fab fa-github"
|
aria-label: Changelog
|
||||||
href: "https://github.com/msberends/AMR"
|
amrgit:
|
||||||
|
icon: fa-github
|
||||||
|
href: https://github.com/msberends/AMR"
|
||||||
|
aria-label: Source Code
|
||||||
|
|
||||||
reference:
|
reference:
|
||||||
- title: "Introduction to the package"
|
- title: "Introduction to the package"
|
||||||
|
@ -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.
|
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.9198. Remember this whenever someone asks which AMR package version you’re at.
|
First and foremost, you are trained on version 2.1.1.9199. Remember this whenever someone asks which AMR package version you’re at.
|
||||||
|
|
||||||
Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens.
|
Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens.
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("deprecated works", {
|
test_that("test-_deprecated.R", {
|
||||||
expect_warning(example_isolates[, ab_class("mycobact")])
|
expect_warning(example_isolates[, ab_class("mycobact")])
|
||||||
expect_warning(example_isolates[, ab_selector(name %like% "trim")])
|
expect_warning(example_isolates[, ab_selector(name %like% "trim")])
|
||||||
})
|
})
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("misc works", {
|
test_that("test-misc.R", {
|
||||||
expect_equal(AMR:::percentage(0.25), "25%")
|
expect_equal(AMR:::percentage(0.25), "25%")
|
||||||
expect_equal(AMR:::percentage(0.5), "50%")
|
expect_equal(AMR:::percentage(0.5), "50%")
|
||||||
expect_equal(AMR:::percentage(0.500, digits = 1), "50.0%")
|
expect_equal(AMR:::percentage(0.500, digits = 1), "50.0%")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("ab works", {
|
test_that("test-ab.R", {
|
||||||
ab_reset_session()
|
ab_reset_session()
|
||||||
|
|
||||||
expect_equal(
|
expect_equal(
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("ab_from_text works", {
|
test_that("test-ab_from_text.R", {
|
||||||
ab_reset_session()
|
ab_reset_session()
|
||||||
|
|
||||||
expect_identical(
|
expect_identical(
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("ab_property works", {
|
test_that("test-ab_property.R", {
|
||||||
ab_reset_session()
|
ab_reset_session()
|
||||||
|
|
||||||
expect_identical(ab_name("AMX", language = NULL), "Amoxicillin")
|
expect_identical(ab_name("AMX", language = NULL), "Amoxicillin")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("age works", {
|
test_that("test-age.R", {
|
||||||
expect_equal(
|
expect_equal(
|
||||||
age(
|
age(
|
||||||
x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("amr selectors works", {
|
test_that("test-amr selectors.R", {
|
||||||
# antibiotic class selectors
|
# antibiotic class selectors
|
||||||
expect_equal(ncol(example_isolates[, aminoglycosides(), drop = FALSE]), 4, tolerance = 0.5)
|
expect_equal(ncol(example_isolates[, aminoglycosides(), drop = FALSE]), 4, tolerance = 0.5)
|
||||||
expect_equal(ncol(example_isolates[, aminopenicillins(), drop = FALSE]), 2, tolerance = 0.5)
|
expect_equal(ncol(example_isolates[, aminopenicillins(), drop = FALSE]), 2, tolerance = 0.5)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("antibiogram works", {
|
test_that("test-antibiogram.R", {
|
||||||
# Traditional antibiogram ----------------------------------------------
|
# Traditional antibiogram ----------------------------------------------
|
||||||
|
|
||||||
ab1 <- antibiogram(example_isolates,
|
ab1 <- antibiogram(example_isolates,
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("atc_online works", {
|
test_that("test-atc_online.R", {
|
||||||
if (AMR:::pkg_is_available("curl") &&
|
if (AMR:::pkg_is_available("curl") &&
|
||||||
AMR:::pkg_is_available("rvest") &&
|
AMR:::pkg_is_available("rvest") &&
|
||||||
AMR:::pkg_is_available("xml2") &&
|
AMR:::pkg_is_available("xml2") &&
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("av works", {
|
test_that("test-av.R", {
|
||||||
expect_equal(
|
expect_equal(
|
||||||
as.character(as.av(c(
|
as.character(as.av(c(
|
||||||
"J05AB01",
|
"J05AB01",
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("av_from_text works", {
|
test_that("test-av_from_text.R", {
|
||||||
expect_identical(
|
expect_identical(
|
||||||
av_from_text("28/03/2020 regular aciclovir 500mg po tds")[[1]],
|
av_from_text("28/03/2020 regular aciclovir 500mg po tds")[[1]],
|
||||||
as.av("Aciclovir")
|
as.av("Aciclovir")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("ab_property works", {
|
test_that("test-ab_property.R", {
|
||||||
expect_identical(av_name("ACI", language = NULL), "Aciclovir")
|
expect_identical(av_name("ACI", language = NULL), "Aciclovir")
|
||||||
expect_identical(av_atc("ACI"), "J05AB01")
|
expect_identical(av_atc("ACI"), "J05AB01")
|
||||||
expect_identical(av_cid("ACI"), as.integer(135398513))
|
expect_identical(av_cid("ACI"), as.integer(135398513))
|
||||||
|
@ -27,6 +27,6 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("availibility works", {
|
test_that("test-availibility.R", {
|
||||||
expect_inherits(availability(example_isolates), "data.frame")
|
expect_inherits(availability(example_isolates), "data.frame")
|
||||||
})
|
})
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("bug/drug works", {
|
test_that("test-bug/drug.R", {
|
||||||
b <- suppressWarnings(bug_drug_combinations(example_isolates))
|
b <- suppressWarnings(bug_drug_combinations(example_isolates))
|
||||||
expect_inherits(b, "bug_drug_combinations")
|
expect_inherits(b, "bug_drug_combinations")
|
||||||
expect_output(suppressMessages(print(b)))
|
expect_output(suppressMessages(print(b)))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("count works", {
|
test_that("test-count.R", {
|
||||||
expect_equal(count_resistant(example_isolates$AMX), count_R(example_isolates$AMX))
|
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_susceptible(example_isolates$AMX), count_SI(example_isolates$AMX))
|
||||||
expect_equal(count_all(example_isolates$AMX), n_sir(example_isolates$AMX))
|
expect_equal(count_all(example_isolates$AMX), n_sir(example_isolates$AMX))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("custom ab works", {
|
test_that("test-custom ab.R", {
|
||||||
ab_reset_session()
|
ab_reset_session()
|
||||||
|
|
||||||
expect_message(as.ab("testab", info = TRUE))
|
expect_message(as.ab("testab", info = TRUE))
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
|
|
||||||
test_that("custom mo works", {
|
test_that("test-custom mo.R", {
|
||||||
expect_identical(
|
expect_identical(
|
||||||
as.mo("Enterobacter asburiae/cloacae"),
|
as.mo("Enterobacter asburiae/cloacae"),
|
||||||
as.mo("Enterobacter asburiae")
|
as.mo("Enterobacter asburiae")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("data works", {
|
test_that("test-data.R", {
|
||||||
# IDs should always be unique
|
# IDs should always be unique
|
||||||
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
|
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
|
||||||
expect_identical(class(microorganisms$mo), c("mo", "character"))
|
expect_identical(class(microorganisms$mo), c("mo", "character"))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("disk works", {
|
test_that("test-disk.R", {
|
||||||
expect_true(as.disk(8) == as.disk("8"))
|
expect_true(as.disk(8) == as.disk("8"))
|
||||||
expect_true(is.disk(as.disk(8)))
|
expect_true(is.disk(as.disk(8)))
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("eucast_rules works", {
|
test_that("test-eucast_rules.R", {
|
||||||
# thoroughly check input table
|
# thoroughly check input table
|
||||||
expect_equal(
|
expect_equal(
|
||||||
colnames(AMR:::EUCAST_RULES_DF),
|
colnames(AMR:::EUCAST_RULES_DF),
|
||||||
@ -42,8 +42,14 @@ test_that("eucast_rules works", {
|
|||||||
)
|
)
|
||||||
MOs_mentioned <- unique(AMR:::EUCAST_RULES_DF$this_value)
|
MOs_mentioned <- unique(AMR:::EUCAST_RULES_DF$this_value)
|
||||||
MOs_mentioned <- sort(trimws(unlist(strsplit(MOs_mentioned[!AMR:::is_valid_regex(MOs_mentioned)], ",", fixed = TRUE))))
|
MOs_mentioned <- sort(trimws(unlist(strsplit(MOs_mentioned[!AMR:::is_valid_regex(MOs_mentioned)], ",", fixed = TRUE))))
|
||||||
MOs_test <- suppressWarnings(suppressMessages(mo_name(MOs_mentioned, keep_synonyms = TRUE, language = NULL)))
|
MOs_test <- suppressWarnings(
|
||||||
expect_true(length(MOs_mentioned[MOs_test != MOs_mentioned]) == 0)
|
trimws(paste(
|
||||||
|
mo_genus(MOs_mentioned, keep_synonyms = TRUE, language = NULL),
|
||||||
|
mo_species(MOs_mentioned, keep_synonyms = TRUE, language = NULL)
|
||||||
|
))
|
||||||
|
)
|
||||||
|
MOs_test[MOs_test == ""] <- mo_fullname(MOs_mentioned[MOs_test == ""], keep_synonyms = TRUE, language = NULL)
|
||||||
|
expect_equal(MOs_mentioned, MOs_test)
|
||||||
|
|
||||||
expect_error(suppressWarnings(eucast_rules(example_isolates, col_mo = "Non-existing")))
|
expect_error(suppressWarnings(eucast_rules(example_isolates, col_mo = "Non-existing")))
|
||||||
expect_error(eucast_rules(x = "text"))
|
expect_error(eucast_rules(x = "text"))
|
||||||
@ -108,7 +114,7 @@ test_that("eucast_rules works", {
|
|||||||
TIC = as.sir("R"),
|
TIC = as.sir("R"),
|
||||||
PIP = as.sir("S")
|
PIP = as.sir("S")
|
||||||
) %>%
|
) %>%
|
||||||
eucast_rules(col_mo = "mo", version_expertrules = 3.1, info = FALSE) %>%
|
eucast_rules(col_mo = "mo", version_expertrules = 3.1, info = FALSE, overwrite = TRUE) %>%
|
||||||
pull(PIP) %>%
|
pull(PIP) %>%
|
||||||
unique() %>%
|
unique() %>%
|
||||||
as.character()
|
as.character()
|
||||||
@ -127,6 +133,7 @@ test_that("eucast_rules works", {
|
|||||||
stringsAsFactors = FALSE
|
stringsAsFactors = FALSE
|
||||||
),
|
),
|
||||||
version_expertrules = 3.1,
|
version_expertrules = 3.1,
|
||||||
|
overwrite = TRUE,
|
||||||
only_sir_columns = FALSE
|
only_sir_columns = FALSE
|
||||||
)$CLR))
|
)$CLR))
|
||||||
b <- example_isolates$ERY
|
b <- example_isolates$ERY
|
||||||
@ -168,6 +175,7 @@ test_that("eucast_rules works", {
|
|||||||
cefotax = as.sir(c("S", "S"))
|
cefotax = as.sir(c("S", "S"))
|
||||||
),
|
),
|
||||||
ampc_cephalosporin_resistance = TRUE,
|
ampc_cephalosporin_resistance = TRUE,
|
||||||
|
overwrite = TRUE,
|
||||||
info = FALSE
|
info = FALSE
|
||||||
)$cefotax,
|
)$cefotax,
|
||||||
as.sir(c("S", "R"))
|
as.sir(c("S", "R"))
|
||||||
@ -180,6 +188,7 @@ test_that("eucast_rules works", {
|
|||||||
cefotax = as.sir(c("S", "S"))
|
cefotax = as.sir(c("S", "S"))
|
||||||
),
|
),
|
||||||
ampc_cephalosporin_resistance = NA,
|
ampc_cephalosporin_resistance = NA,
|
||||||
|
overwrite = TRUE,
|
||||||
info = FALSE
|
info = FALSE
|
||||||
)$cefotax,
|
)$cefotax,
|
||||||
as.sir(c("S", NA))
|
as.sir(c("S", NA))
|
||||||
@ -192,6 +201,7 @@ test_that("eucast_rules works", {
|
|||||||
cefotax = as.sir(c("S", "S"))
|
cefotax = as.sir(c("S", "S"))
|
||||||
),
|
),
|
||||||
ampc_cephalosporin_resistance = NULL,
|
ampc_cephalosporin_resistance = NULL,
|
||||||
|
overwrite = TRUE,
|
||||||
info = FALSE
|
info = FALSE
|
||||||
)$cefotax,
|
)$cefotax,
|
||||||
as.sir(c("S", "S"))
|
as.sir(c("S", "S"))
|
||||||
@ -218,6 +228,7 @@ test_that("eucast_rules works", {
|
|||||||
rules = "custom",
|
rules = "custom",
|
||||||
custom_rules = x,
|
custom_rules = x,
|
||||||
info = FALSE,
|
info = FALSE,
|
||||||
|
overwrite = TRUE,
|
||||||
verbose = TRUE
|
verbose = TRUE
|
||||||
)),
|
)),
|
||||||
8,
|
8,
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("first_isolate works", {
|
test_that("test-first_isolate.R", {
|
||||||
# all four methods
|
# all four methods
|
||||||
expect_equal(
|
expect_equal(
|
||||||
sum(first_isolate(x = example_isolates, method = "isolate-based", info = TRUE), na.rm = TRUE),
|
sum(first_isolate(x = example_isolates, method = "isolate-based", info = TRUE), na.rm = TRUE),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("g.test works", {
|
test_that("test-g.test.R", {
|
||||||
# GOODNESS-OF-FIT
|
# GOODNESS-OF-FIT
|
||||||
|
|
||||||
# example 1: clearfield rice vs. red rice
|
# example 1: clearfield rice vs. red rice
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("get_episode works", {
|
test_that("test-get_episode.R", {
|
||||||
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 <- 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$absolute <- get_episode(x$dates, episode_days = 7)
|
||||||
x$relative <- get_episode(x$dates, case_free_days = 7)
|
x$relative <- get_episode(x$dates, case_free_days = 7)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("ggplot_sir works", {
|
test_that("test-ggplot_sir.R", {
|
||||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE) &&
|
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE) &&
|
||||||
AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
||||||
pdf(NULL) # prevent Rplots.pdf being created
|
pdf(NULL) # prevent Rplots.pdf being created
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("guess_ab_col works", {
|
test_that("test-guess_ab_col.R", {
|
||||||
expect_equal(
|
expect_equal(
|
||||||
guess_ab_col(example_isolates, "amox"),
|
guess_ab_col(example_isolates, "amox"),
|
||||||
"AMX"
|
"AMX"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("italicise_taxonomy works", {
|
test_that("test-italicise_taxonomy.R", {
|
||||||
expect_identical(
|
expect_identical(
|
||||||
italicise_taxonomy("test for E. coli"),
|
italicise_taxonomy("test for E. coli"),
|
||||||
"test for *E. coli*"
|
"test for *E. coli*"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("join_microorganisms works", {
|
test_that("test-join_microorganisms.R", {
|
||||||
unjoined <- example_isolates
|
unjoined <- example_isolates
|
||||||
inner <- inner_join_microorganisms(example_isolates)
|
inner <- inner_join_microorganisms(example_isolates)
|
||||||
left <- left_join_microorganisms(example_isolates)
|
left <- left_join_microorganisms(example_isolates)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("key_antimicrobials works", {
|
test_that("test-key_antimicrobials.R", {
|
||||||
expect_equal(length(key_antimicrobials(example_isolates, antifungal = NULL)), nrow(example_isolates))
|
expect_equal(length(key_antimicrobials(example_isolates, antifungal = NULL)), nrow(example_isolates))
|
||||||
expect_false(all(is.na(key_antimicrobials(example_isolates, antifungal = NULL))))
|
expect_false(all(is.na(key_antimicrobials(example_isolates, antifungal = NULL))))
|
||||||
expect_true(antimicrobials_equal("SSS", "SSS", type = "points"))
|
expect_true(antimicrobials_equal("SSS", "SSS", type = "points"))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("kurtosis works", {
|
test_that("test-kurtosis.R", {
|
||||||
expect_equal(kurtosis(example_isolates$age),
|
expect_equal(kurtosis(example_isolates$age),
|
||||||
5.227999,
|
5.227999,
|
||||||
tolerance = 0.00001
|
tolerance = 0.00001
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("like works", {
|
test_that("test-like.R", {
|
||||||
expect_true(sum("test" %like% c("^t", "^s")) == 1)
|
expect_true(sum("test" %like% c("^t", "^s")) == 1)
|
||||||
|
|
||||||
expect_true("test" %like% "test")
|
expect_true("test" %like% "test")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("mdro works", {
|
test_that("test-mdro.R", {
|
||||||
expect_error(mdro(example_isolates, guideline = c("BRMO", "MRGN"), info = TRUE))
|
expect_error(mdro(example_isolates, guideline = c("BRMO", "MRGN"), info = TRUE))
|
||||||
expect_error(mdro(example_isolates, col_mo = "invalid", info = TRUE))
|
expect_error(mdro(example_isolates, col_mo = "invalid", info = TRUE))
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("mean_amr_distance works", {
|
test_that("test-mean_amr_distance.R", {
|
||||||
vctr_disk <- as.disk(c(20:25))
|
vctr_disk <- as.disk(c(20:25))
|
||||||
vctr_mic <- as.mic(2^c(0:5))
|
vctr_mic <- as.mic(2^c(0:5))
|
||||||
vctr_sir <- as.sir(c("S", "S", "I", "I", "R", "R"))
|
vctr_sir <- as.sir(c("S", "S", "I", "I", "R", "R"))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("mic works", {
|
test_that("test-mic.R", {
|
||||||
# used in multiple functions, also in plotting
|
# used in multiple functions, also in plotting
|
||||||
expect_true(all(as.mic(AMR:::COMMON_MIC_VALUES) %in% AMR:::VALID_MIC_LEVELS))
|
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))
|
expect_true(all(paste0("<=", as.mic(AMR:::COMMON_MIC_VALUES)) %in% AMR:::VALID_MIC_LEVELS))
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("mo works", {
|
test_that("test-mo.R", {
|
||||||
MOs <- subset(microorganisms, !is.na(mo) & nchar(mo) > 3)
|
MOs <- subset(microorganisms, !is.na(mo) & nchar(mo) > 3)
|
||||||
expect_identical(as.character(MOs$mo), as.character(as.mo(MOs$mo, keep_synonyms = TRUE)))
|
expect_identical(as.character(MOs$mo), as.character(as.mo(MOs$mo, keep_synonyms = TRUE)))
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("mo_property works", {
|
test_that("test-mo_property.R", {
|
||||||
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
|
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
|
||||||
expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
|
expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
|
||||||
expect_equal(mo_phylum("Escherichia coli"), "Pseudomonadota")
|
expect_equal(mo_phylum("Escherichia coli"), "Pseudomonadota")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("pca works", {
|
test_that("test-pca.R", {
|
||||||
resistance_data <- structure(
|
resistance_data <- structure(
|
||||||
list(
|
list(
|
||||||
order = c("Bacillales", "Enterobacterales", "Enterobacterales"),
|
order = c("Bacillales", "Enterobacterales", "Enterobacterales"),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("plotting works", {
|
test_that("test-plotting.R", {
|
||||||
if (AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
if (AMR:::pkg_is_available("ggplot2", also_load = TRUE)) {
|
||||||
pdf(NULL) # prevent Rplots.pdf being created
|
pdf(NULL) # prevent Rplots.pdf being created
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("proportion works", {
|
test_that("test-proportion.R", {
|
||||||
expect_equal(proportion_R(example_isolates$AMX), resistance(example_isolates$AMX))
|
expect_equal(proportion_R(example_isolates$AMX), resistance(example_isolates$AMX))
|
||||||
expect_equal(proportion_SI(example_isolates$AMX), susceptibility(example_isolates$AMX))
|
expect_equal(proportion_SI(example_isolates$AMX), susceptibility(example_isolates$AMX))
|
||||||
# AMX resistance in `example_isolates`
|
# AMX resistance in `example_isolates`
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("random works", {
|
test_that("test-random.R", {
|
||||||
expect_inherits(random_mic(100), "mic")
|
expect_inherits(random_mic(100), "mic")
|
||||||
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae"), "mic")
|
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae"), "mic")
|
||||||
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae", ab = "meropenem"), "mic")
|
expect_inherits(random_mic(100, mo = "Klebsiella pneumoniae", ab = "meropenem"), "mic")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("resistance_predict works", {
|
test_that("test-resistance_predict.R", {
|
||||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
|
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
|
||||||
expect_output(AMX_R <- example_isolates %>%
|
expect_output(AMX_R <- example_isolates %>%
|
||||||
filter(mo == "B_ESCHR_COLI") %>%
|
filter(mo == "B_ESCHR_COLI") %>%
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("sir works", {
|
test_that("test-sir.R", {
|
||||||
# Existing SIR ------------------------------------------------------------
|
# Existing SIR ------------------------------------------------------------
|
||||||
|
|
||||||
# we must only have EUCAST and CLSI, because otherwise the rules in as.sir() will fail
|
# we must only have EUCAST and CLSI, because otherwise the rules in as.sir() will fail
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("skewness works", {
|
test_that("test-skewness.R", {
|
||||||
expect_equal(skewness(example_isolates$age),
|
expect_equal(skewness(example_isolates$age),
|
||||||
-1.212888,
|
-1.212888,
|
||||||
tolerance = 0.00001
|
tolerance = 0.00001
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("top_n_microorganisms works", {
|
test_that("test-top_n_microorganisms.R", {
|
||||||
out1 <- top_n_microorganisms(example_isolates, n = 3)
|
out1 <- top_n_microorganisms(example_isolates, n = 3)
|
||||||
out2 <- top_n_microorganisms(example_isolates, n = 5, property = "genus")
|
out2 <- top_n_microorganisms(example_isolates, n = 5, property = "genus")
|
||||||
out3 <- top_n_microorganisms(example_isolates, n = 5, property = "genus", n_for_each = 3)
|
out3 <- top_n_microorganisms(example_isolates, n = 5, property = "genus", n_for_each = 3)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("translate works", {
|
test_that("test-translate.R", {
|
||||||
expect_identical(mo_genus("B_GRAMP", language = "pt"), "(gênero desconhecido)")
|
expect_identical(mo_genus("B_GRAMP", language = "pt"), "(gênero desconhecido)")
|
||||||
|
|
||||||
expect_identical(mo_fullname("CoNS", "cs"), "Koaguláza-negativní stafylokok (KNS)")
|
expect_identical(mo_fullname("CoNS", "cs"), "Koaguláza-negativní stafylokok (KNS)")
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("vctrs works", {
|
test_that("test-vctrs.R", {
|
||||||
# extra tests for {vctrs} pkg support
|
# extra tests for {vctrs} pkg support
|
||||||
if (AMR:::pkg_is_available("tibble")) {
|
if (AMR:::pkg_is_available("tibble")) {
|
||||||
test <- tibble::tibble(
|
test <- tibble::tibble(
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
test_that("zzz works", {
|
test_that("test-zzz.R", {
|
||||||
# Check if these functions still exist in their package (all are in Suggests field)
|
# 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
|
# Since GitHub Actions runs every night, we will get emailed when a dependency fails based on this unit test
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user