1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 20:06:12 +01:00

(v0.8.0.9014) unit test update

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-11-05 22:23:45 +01:00
parent 2560aa1a53
commit a1fd2cd98a
11 changed files with 16 additions and 19 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 0.8.0.9013 Version: 0.8.0.9014
Date: 2019-11-05 Date: 2019-11-05
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(

View File

@ -1,4 +1,4 @@
# AMR 0.8.0.9013 # AMR 0.8.0.9014
<small>Last updated: 05-Nov-2019</small> <small>Last updated: 05-Nov-2019</small>
### New ### New

View File

@ -298,8 +298,7 @@ mdro <- function(x,
"PLB", "PLB",
"TCY", "TCY",
"DOX", "DOX",
"MNO" "MNO"),
),
verbose = verbose, ...) verbose = verbose, ...)
} else if (guideline$code == "tb") { } else if (guideline$code == "tb") {
cols_ab <- get_column_abx(x = x, cols_ab <- get_column_abx(x = x,
@ -442,7 +441,6 @@ mdro <- function(x,
cols <- cols[!ab_missing(cols)] cols <- cols[!ab_missing(cols)]
cols <- cols[!is.na(cols)] cols <- cols[!is.na(cols)]
if (length(rows) > 0 & length(cols) > 0) { if (length(rows) > 0 & length(cols) > 0) {
#print(cols)
x <<- x %>% mutate_at(vars(cols), as.rsi) x <<- x %>% mutate_at(vars(cols), as.rsi)
x[rows, "columns_nonsusceptible"] <<- sapply(rows, x[rows, "columns_nonsusceptible"] <<- sapply(rows,
function(row, group_vct = cols) { function(row, group_vct = cols) {
@ -905,8 +903,7 @@ mdro <- function(x,
} }
x[which( x[which(
x$fullname %like% "Pseudomonas aeruginosa" x$fullname %like% "Pseudomonas aeruginosa"
& x$psae >= 3 & x$psae >= 3), "MDRO"] <- 3
), "MDRO"] <- 3
# Table 3 # Table 3
trans_tbl(3, trans_tbl(3,
@ -990,7 +987,7 @@ mdro <- function(x,
} }
# some more info on negative results # some more info on negative results
if (verbose == TRUE ) { if (verbose == TRUE) {
if (guideline$code == "cmi2012") { if (guideline$code == "cmi2012") {
x[which(x$MDRO == 1 & !is.na(x$classes_affected)), "reason"] <- paste0(x$classes_affected[which(x$MDRO == 1 & !is.na(x$classes_affected))], " of ", x$classes_available[which(x$MDRO == 1 & !is.na(x$classes_affected))], " available classes contain R or I (3 required for MDR)") x[which(x$MDRO == 1 & !is.na(x$classes_affected)), "reason"] <- paste0(x$classes_affected[which(x$MDRO == 1 & !is.na(x$classes_affected))], " of ", x$classes_available[which(x$MDRO == 1 & !is.na(x$classes_affected))], " available classes contain R or I (3 required for MDR)")
} else { } else {

View File

@ -39,7 +39,7 @@ environment:
GCC_PATH: mingw_64 GCC_PATH: mingw_64
WARNINGS_ARE_ERRORS: 1 WARNINGS_ARE_ERRORS: 1
PKGTYPE: win.binary PKGTYPE: win.binary
# USE_RTOOLS: true USE_RTOOLS: true
matrix: matrix:
- R_VERSION: release - R_VERSION: release

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>

View File

@ -45,7 +45,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>
@ -231,9 +231,9 @@
</div> </div>
<div id="amr-0-8-0-9013" class="section level1"> <div id="amr-0-8-0-9014" class="section level1">
<h1 class="page-header"> <h1 class="page-header">
<a href="#amr-0-8-0-9013" class="anchor"></a>AMR 0.8.0.9013<small> Unreleased </small> <a href="#amr-0-8-0-9014" class="anchor"></a>AMR 0.8.0.9014<small> Unreleased </small>
</h1> </h1>
<p><small>Last updated: 05-Nov-2019</small></p> <p><small>Last updated: 05-Nov-2019</small></p>
<div id="new" class="section level3"> <div id="new" class="section level3">
@ -1333,7 +1333,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav"> <div id="tocnav">
<h2>Contents</h2> <h2>Contents</h2>
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0-8-0-9013">0.8.0.9013</a></li> <li><a href="#amr-0-8-0-9014">0.8.0.9014</a></li>
<li><a href="#amr-0-8-0">0.8.0</a></li> <li><a href="#amr-0-8-0">0.8.0</a></li>
<li><a href="#amr-0-7-1">0.7.1</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-7-0">0.7.0</a></li>

View File

@ -84,7 +84,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">0.8.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9014</span>
</span> </span>
</div> </div>