mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 08:06:12 +01:00
(v1.3.0.9025) optimalisation
This commit is contained in:
parent
2f0186ace2
commit
a1411ddafc
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.3.0.9024
|
Version: 1.3.0.9025
|
||||||
Date: 2020-09-19
|
Date: 2020-09-19
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 1.3.0.9024
|
# AMR 1.3.0.9025
|
||||||
## <small>Last updated: 19 September 2020</small>
|
## <small>Last updated: 19 September 2020</small>
|
||||||
|
|
||||||
Note: some changes in this version were suggested by anonymous reviewers from the journal we submitted our manuscipt to. We are those reviewers very grateful for going through our code so thoroughly!
|
Note: some changes in this version were suggested by anonymous reviewers from the journal we submitted our manuscipt to. We are those reviewers very grateful for going through our code so thoroughly!
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
|
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -236,9 +236,9 @@
|
|||||||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-1309024" class="section level1">
|
<div id="amr-1309025" class="section level1">
|
||||||
<h1 class="page-header" data-toc-text="1.3.0.9024">
|
<h1 class="page-header" data-toc-text="1.3.0.9025">
|
||||||
<a href="#amr-1309024" class="anchor"></a>AMR 1.3.0.9024<small> Unreleased </small>
|
<a href="#amr-1309025" class="anchor"></a>AMR 1.3.0.9025<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="last-updated-19-september-2020" class="section level2">
|
<div id="last-updated-19-september-2020" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
|
@ -2,7 +2,7 @@ pandoc: 2.7.3
|
|||||||
pkgdown: 1.5.1.9000
|
pkgdown: 1.5.1.9000
|
||||||
pkgdown_sha: eae56f08694abebf93cdfc0dd8e9ede06d8c815f
|
pkgdown_sha: eae56f08694abebf93cdfc0dd8e9ede06d8c815f
|
||||||
articles: []
|
articles: []
|
||||||
last_built: 2020-09-19T10:17Z
|
last_built: 2020-09-19T13:07Z
|
||||||
urls:
|
urls:
|
||||||
reference: https://msberends.github.io/AMR/reference
|
reference: https://msberends.github.io/AMR/reference
|
||||||
article: https://msberends.github.io/AMR/articles
|
article: https://msberends.github.io/AMR/articles
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<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">1.3.0.9024</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9025</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -30,7 +30,8 @@ test_that("EUCAST rules work", {
|
|||||||
c("if_mo_property", "like.is.one_of", "this_value",
|
c("if_mo_property", "like.is.one_of", "this_value",
|
||||||
"and_these_antibiotics", "have_these_values",
|
"and_these_antibiotics", "have_these_values",
|
||||||
"then_change_these_antibiotics", "to_value",
|
"then_change_these_antibiotics", "to_value",
|
||||||
"reference.rule", "reference.rule_group"))
|
"reference.rule", "reference.rule_group",
|
||||||
|
"reference.version"))
|
||||||
|
|
||||||
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"))
|
||||||
|
@ -38,10 +38,10 @@ test_that("mic works", {
|
|||||||
|
|
||||||
expect_warning(as.mic("INVALID VALUE"))
|
expect_warning(as.mic("INVALID VALUE"))
|
||||||
|
|
||||||
# print plots
|
pdf(NULL) # prevent Rplots.pdf being created
|
||||||
expect_success(x <- barplot(as.mic(c(1, 2, 4, 8))))
|
expect_silent(barplot(as.mic(c(1, 2, 4, 8))))
|
||||||
expect_success(x <- plot(as.mic(c(1, 2, 4, 8))))
|
expect_silent(plot(as.mic(c(1, 2, 4, 8))))
|
||||||
expect_success(x <- print(as.mic(c(1, 2, 4, 8))))
|
expect_output(print(as.mic(c(1, 2, 4, 8))))
|
||||||
|
|
||||||
expect_equal(summary(as.mic(c(2, 8))),
|
expect_equal(summary(as.mic(c(2, 8))),
|
||||||
structure(c("Class" = "mic",
|
structure(c("Class" = "mic",
|
||||||
|
@ -35,8 +35,9 @@ test_that("prediction of rsi works", {
|
|||||||
expect_true(AMX_R[3] < AMX_R[20])
|
expect_true(AMX_R[3] < AMX_R[20])
|
||||||
|
|
||||||
x <- resistance_predict(example_isolates, col_ab = "AMX", year_min = 2010, model = "binomial")
|
x <- resistance_predict(example_isolates, col_ab = "AMX", year_min = 2010, model = "binomial")
|
||||||
expect_success(y <- plot(x))
|
pdf(NULL) # prevent Rplots.pdf being created
|
||||||
expect_success(y <- ggplot_rsi_predict(x))
|
expect_silent(plot(x))
|
||||||
|
expect_silent(ggplot_rsi_predict(x))
|
||||||
expect_error(ggplot_rsi_predict(example_isolates))
|
expect_error(ggplot_rsi_predict(example_isolates))
|
||||||
|
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
|
@ -28,10 +28,10 @@ test_that("rsi works", {
|
|||||||
expect_true(as.rsi("I") < as.rsi("R"))
|
expect_true(as.rsi("I") < as.rsi("R"))
|
||||||
expect_true(is.rsi(as.rsi("S")))
|
expect_true(is.rsi(as.rsi("S")))
|
||||||
|
|
||||||
# print plots, should not raise errors
|
pdf(NULL) # prevent Rplots.pdf being created
|
||||||
expect_success(x <- barplot(as.rsi(c("S", "I", "R"))))
|
expect_silent(barplot(as.rsi(c("S", "I", "R"))))
|
||||||
expect_success(x <- plot(as.rsi(c("S", "I", "R"))))
|
expect_silent(plot(as.rsi(c("S", "I", "R"))))
|
||||||
expect_success(x <- print(as.rsi(c("S", "I", "R"))))
|
expect_output(print(as.rsi(c("S", "I", "R"))))
|
||||||
|
|
||||||
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
expect_equal(as.character(as.rsi(c(1:3))), c("S", "I", "R"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user