mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 06:06:12 +01:00
(v0.7.1.9095) get_column_abx() fix
This commit is contained in:
parent
3d5692219e
commit
1e260d85c8
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.7.1.9094
|
Version: 0.7.1.9095
|
||||||
Date: 2019-10-06
|
Date: 2019-10-06
|
||||||
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 0.7.1.9094
|
# AMR 0.7.1.9095
|
||||||
<small>Last updated: 06-Oct-2019</small>
|
<small>Last updated: 06-Oct-2019</small>
|
||||||
|
|
||||||
### Breaking
|
### Breaking
|
||||||
|
@ -129,9 +129,14 @@ get_column_abx <- function(x,
|
|||||||
x <- as.character(df_trans$colnames)
|
x <- as.character(df_trans$colnames)
|
||||||
names(x) <- df_trans$abcode
|
names(x) <- df_trans$abcode
|
||||||
|
|
||||||
# remove the ones that do not already have the rsi class (as.rsi) and that have >50% invalid values
|
# remove the ones that are not a valid AB code, ATC code, name, abbreviation or synonym,
|
||||||
x <- sapply(x, function(col = x, df = x_bak) {
|
# and do not already have the rsi class (as.rsi)
|
||||||
ifelse(is.rsi(as.data.frame(df)[, col]) |
|
# and that have >50% invalid values
|
||||||
|
vectr_antibiotics <- unique(toupper(unlist(AMR::antibiotics[,c("ab", "atc", "name", "abbreviations", "synonyms")])))
|
||||||
|
vectr_antibiotics <- vectr_antibiotics[!is.na(vectr_antibiotics) & nchar(vectr_antibiotics) >= 3]
|
||||||
|
x <- sapply(x, function(col = x, df = x_bak) {
|
||||||
|
ifelse(toupper(col) %in% vectr_antibiotics |
|
||||||
|
is.rsi(as.data.frame(df)[, col]) |
|
||||||
is.rsi.eligible(as.data.frame(df)[, col], threshold = 0.5),
|
is.rsi.eligible(as.data.frame(df)[, col], threshold = 0.5),
|
||||||
col,
|
col,
|
||||||
NA)
|
NA)
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</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">0.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -231,9 +231,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-0-7-1-9094" class="section level1">
|
<div id="amr-0-7-1-9095" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-0-7-1-9094" class="anchor"></a>AMR 0.7.1.9094<small> Unreleased </small>
|
<a href="#amr-0-7-1-9095" class="anchor"></a>AMR 0.7.1.9095<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<p><small>Last updated: 06-Oct-2019</small></p>
|
<p><small>Last updated: 06-Oct-2019</small></p>
|
||||||
<div id="breaking" class="section level3">
|
<div id="breaking" class="section level3">
|
||||||
@ -1289,7 +1289,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-7-1-9094">0.7.1.9094</a></li>
|
<li><a href="#amr-0-7-1-9095">0.7.1.9095</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>
|
||||||
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
||||||
|
@ -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.7.1.9094</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9095</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user