mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 05:26:13 +01:00
(v0.7.1.9084) CI fix
This commit is contained in:
parent
8ce252fbc5
commit
76dc948067
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 0.7.1.9083
|
||||
Version: 0.7.1.9084
|
||||
Date: 2019-09-23
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 0.7.1.9083
|
||||
# AMR 0.7.1.9084
|
||||
<small>Last updated: 23-Sep-2019</small>
|
||||
|
||||
### Breaking
|
||||
|
@ -53,6 +53,7 @@ globalVariables(c(".",
|
||||
"mdr",
|
||||
"median",
|
||||
"microorganisms",
|
||||
"microorganisms.codes",
|
||||
"missing_names",
|
||||
"mo",
|
||||
"mono_count",
|
||||
|
9
R/mo.R
9
R/mo.R
@ -652,9 +652,9 @@ exec_as.mo <- function(x,
|
||||
if (!is.null(reference_df)) {
|
||||
# self-defined reference
|
||||
if (x_backup[i] %in% reference_df[, 1]) {
|
||||
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], "mo"]
|
||||
if (ref_mo %in% data_to_check[, mo]) {
|
||||
x[i] <- data_to_check[mo == ref_mo, ..property][[1]][1L]
|
||||
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], "mo"][[1L]]
|
||||
if (ref_mo %in% microorganismsDT[, mo]) {
|
||||
x[i] <- microorganismsDT[mo == ref_mo, ..property][[1]][1L]
|
||||
next
|
||||
} else {
|
||||
warning("Value '", x_backup[i], "' was found in reference_df, but '", ref_mo, "' is not a valid MO code.", call. = FALSE)
|
||||
@ -769,8 +769,7 @@ exec_as.mo <- function(x,
|
||||
}
|
||||
next
|
||||
}
|
||||
if (toupper(x_backup_without_spp[i]) == 'CRS'
|
||||
| toupper(x_backup_without_spp[i]) == 'CRSM') {
|
||||
if (toupper(x_backup_without_spp[i]) == 'CRSM') {
|
||||
# co-trim resistant S. maltophilia
|
||||
x[i] <- microorganismsDT[mo == 'B_STNTR_MLTP', ..property][[1]][1L]
|
||||
if (initial_search == TRUE) {
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -225,9 +225,9 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="amr-0-7-1-9083" class="section level1">
|
||||
<div id="amr-0-7-1-9084" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0-7-1-9083" class="anchor"></a>AMR 0.7.1.9083<small> Unreleased </small>
|
||||
<a href="#amr-0-7-1-9084" class="anchor"></a>AMR 0.7.1.9084<small> Unreleased </small>
|
||||
</h1>
|
||||
<p><small>Last updated: 23-Sep-2019</small></p>
|
||||
<div id="breaking" class="section level3">
|
||||
@ -1280,7 +1280,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<div id="tocnav">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#amr-0-7-1-9083">0.7.1.9083</a></li>
|
||||
<li><a href="#amr-0-7-1-9084">0.7.1.9084</a></li>
|
||||
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
||||
<li><a href="#amr-0-7-0">0.7.0</a></li>
|
||||
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9083</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9084</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -110,7 +110,7 @@ test_that("as.mo works", {
|
||||
# too few characters
|
||||
expect_warning(as.mo("ab"))
|
||||
|
||||
expect_equal(suppressWarnings(as.character(as.mo(c("Qq species", "", "CRS", "K. pneu rhino", "esco")))),
|
||||
expect_equal(suppressWarnings(as.character(as.mo(c("Qq species", "", "CRSM", "K. pneu rhino", "esco")))),
|
||||
c("UNKNOWN", NA_character_, "B_STNTR_MLTP", "B_KLBSL_PNMN_RHNS", "B_ESCHR_COLI"))
|
||||
|
||||
# check for Becker classification
|
||||
@ -221,14 +221,9 @@ test_that("as.mo works", {
|
||||
expect_error(as.mo("E. coli", reference_df = data.frame(mycol = "TestingOwnID")))
|
||||
|
||||
# combination of existing mo and other code
|
||||
expect_identical(suppressWarnings(as.character(as.mo(c("B_ESCHR_COL", "ESCCOL")))),
|
||||
expect_identical(as.character(as.mo(c("B_ESCHR_COL", "ESCCOL"))),
|
||||
c("B_ESCHR_COLI", "B_ESCHR_COLI"))
|
||||
|
||||
# expect_equal(mo_fullname(c("E. spp.",
|
||||
# "E. spp",
|
||||
# "E. species")),
|
||||
# rep("Escherichia species", 3))
|
||||
|
||||
# from different sources
|
||||
expect_equal(as.character(as.mo(
|
||||
c("PRTMIR", "bclcer", "B_ESCHR_COLI"))),
|
||||
|
@ -90,6 +90,8 @@ test_that("mo_property works", {
|
||||
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
|
||||
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
|
||||
|
||||
# old codes must throw a warning in mo_* family
|
||||
expect_warning(mo_name(c("B_ESCHR_COL", "B_STPHY_AUR")))
|
||||
|
||||
# outcome of mo_fullname must always return the fullname from the data set
|
||||
library(dplyr)
|
||||
|
Loading…
Reference in New Issue
Block a user