mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 08:06:12 +01:00
(v1.2.0.9013) unit test fix
This commit is contained in:
parent
779a4e8348
commit
8a66e475d7
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.2.0.9012
|
Version: 1.2.0.9013
|
||||||
Date: 2020-06-22
|
Date: 2020-06-22
|
||||||
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.2.0.9012
|
# AMR 1.2.0.9013
|
||||||
## <small>Last updated: 22-Jun-2020</small>
|
## <small>Last updated: 22-Jun-2020</small>
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
2
R/rsi.R
2
R/rsi.R
@ -59,6 +59,8 @@
|
|||||||
#' @seealso [as.mic()]
|
#' @seealso [as.mic()]
|
||||||
#' @inheritSection AMR Read more on our website!
|
#' @inheritSection AMR Read more on our website!
|
||||||
#' @examples
|
#' @examples
|
||||||
|
#' summary(example_isolates) # see all R/SI results at a glance
|
||||||
|
#'
|
||||||
#' # For INTERPRETING disk diffusion and MIC values -----------------------
|
#' # For INTERPRETING disk diffusion and MIC values -----------------------
|
||||||
#'
|
#'
|
||||||
#' # a whole data set, even with combined MIC values and disk zones
|
#' # a whole data set, even with combined MIC values and disk zones
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
<a class="navbar-link" href="https://msberends.gitlab.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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -229,9 +229,9 @@
|
|||||||
<small>Source: <a href='https://gitlab.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
<small>Source: <a href='https://gitlab.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-1209012" class="section level1">
|
<div id="amr-1209013" class="section level1">
|
||||||
<h1 class="page-header" data-toc-text="1.2.0.9012">
|
<h1 class="page-header" data-toc-text="1.2.0.9013">
|
||||||
<a href="#amr-1209012" class="anchor"></a>AMR 1.2.0.9012<small> Unreleased </small>
|
<a href="#amr-1209013" class="anchor"></a>AMR 1.2.0.9013<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="last-updated-22-jun-2020" class="section level2">
|
<div id="last-updated-22-jun-2020" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
|
@ -10,7 +10,7 @@ articles:
|
|||||||
WHONET: WHONET.html
|
WHONET: WHONET.html
|
||||||
benchmarks: benchmarks.html
|
benchmarks: benchmarks.html
|
||||||
resistance_predict: resistance_predict.html
|
resistance_predict: resistance_predict.html
|
||||||
last_built: 2020-06-22T10:13Z
|
last_built: 2020-06-22T11:18Z
|
||||||
urls:
|
urls:
|
||||||
reference: https://msberends.gitlab.io/AMR/reference
|
reference: https://msberends.gitlab.io/AMR/reference
|
||||||
article: https://msberends.gitlab.io/AMR/articles
|
article: https://msberends.gitlab.io/AMR/articles
|
||||||
|
@ -82,7 +82,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.2.0</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -342,7 +342,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
|||||||
<div class='dont-index'><p><code><a href='as.mic.html'>as.mic()</a></code></p></div>
|
<div class='dont-index'><p><code><a href='as.mic.html'>as.mic()</a></code></p></div>
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||||
<pre class="examples"><span class='co'># For INTERPRETING disk diffusion and MIC values -----------------------</span>
|
<pre class="examples"><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>example_isolates</span>) <span class='co'># see all R/SI results at a glance</span>
|
||||||
|
|
||||||
|
<span class='co'># For INTERPRETING disk diffusion and MIC values -----------------------</span>
|
||||||
|
|
||||||
<span class='co'># a whole data set, even with combined MIC values and disk zones</span>
|
<span class='co'># a whole data set, even with combined MIC values and disk zones</span>
|
||||||
<span class='no'>df</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>microorganism</span> <span class='kw'>=</span> <span class='st'>"E. coli"</span>,
|
<span class='no'>df</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>microorganism</span> <span class='kw'>=</span> <span class='st'>"E. coli"</span>,
|
||||||
|
@ -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.2.0.9012</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.2.0.9013</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -99,6 +99,8 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
|
|||||||
}
|
}
|
||||||
|
|
||||||
\examples{
|
\examples{
|
||||||
|
summary(example_isolates) # see all R/SI results at a glance
|
||||||
|
|
||||||
# For INTERPRETING disk diffusion and MIC values -----------------------
|
# For INTERPRETING disk diffusion and MIC values -----------------------
|
||||||
|
|
||||||
# a whole data set, even with combined MIC values and disk zones
|
# a whole data set, even with combined MIC values and disk zones
|
||||||
|
@ -27,7 +27,6 @@ test_that("rsi works", {
|
|||||||
|
|
||||||
expect_true(as.rsi("S") < as.rsi("I"))
|
expect_true(as.rsi("S") < as.rsi("I"))
|
||||||
expect_true(as.rsi("I") < as.rsi("R"))
|
expect_true(as.rsi("I") < as.rsi("R"))
|
||||||
expect_true(as.rsi("R") > as.rsi("S"))
|
|
||||||
expect_true(is.rsi(as.rsi("S")))
|
expect_true(is.rsi(as.rsi("S")))
|
||||||
|
|
||||||
# print plots, should not raise errors
|
# print plots, should not raise errors
|
||||||
@ -40,11 +39,10 @@ test_that("rsi works", {
|
|||||||
expect_equal(suppressWarnings(as.logical(as.rsi("INVALID VALUE"))), NA)
|
expect_equal(suppressWarnings(as.logical(as.rsi("INVALID VALUE"))), NA)
|
||||||
|
|
||||||
expect_equal(summary(as.rsi(c("S", "R"))), c("Class" = "rsi",
|
expect_equal(summary(as.rsi(c("S", "R"))), c("Class" = "rsi",
|
||||||
"<NA>" = "0",
|
"%R" = "50% (n=1)",
|
||||||
"Sum S" = "1",
|
"%SI" = "50% (n=1)",
|
||||||
"Sum IR" = "1",
|
"- %S" = "50% (n=1)",
|
||||||
"-Sum R" = "1",
|
"- %I" = "0% (n=0)"))
|
||||||
"-Sum I" = "0"))
|
|
||||||
|
|
||||||
expect_identical(as.logical(lapply(example_isolates, is.rsi.eligible)),
|
expect_identical(as.logical(lapply(example_isolates, is.rsi.eligible)),
|
||||||
rep(FALSE, length(example_isolates)))
|
rep(FALSE, length(example_isolates)))
|
||||||
|
Loading…
Reference in New Issue
Block a user