mirror of https://github.com/msberends/AMR.git
(v1.4.0.9060) ab class selector fix
This commit is contained in:
parent
c9de74c81a
commit
8d117820b8
|
@ -1,5 +1,5 @@
|
||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.4.0.9059
|
Version: 1.4.0.9060
|
||||||
Date: 2021-01-04
|
Date: 2021-01-04
|
||||||
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.4.0.9059
|
# AMR 1.4.0.9060
|
||||||
## <small>Last updated: 4 January 2021</small>
|
## <small>Last updated: 4 January 2021</small>
|
||||||
### New
|
### New
|
||||||
* Functions `get_episode()` and `is_new_episode()` to determine (patient) episodes which are not necessarily based on microorganisms. The `get_episode()` function returns the index number of the episode per group, while the `is_new_episode()` function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode. They also support `dplyr`s grouping (i.e. using `group_by()`):
|
* Functions `get_episode()` and `is_new_episode()` to determine (patient) episodes which are not necessarily based on microorganisms. The `get_episode()` function returns the index number of the episode per group, while the `is_new_episode()` function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode. They also support `dplyr`s grouping (i.e. using `group_by()`):
|
||||||
|
|
|
@ -527,7 +527,7 @@ meet_criteria <- function(object,
|
||||||
}
|
}
|
||||||
|
|
||||||
get_current_data <- function(arg_name, call) {
|
get_current_data <- function(arg_name, call) {
|
||||||
if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 100) < 3.2) {
|
if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2) {
|
||||||
if (is.na(arg_name)) {
|
if (is.na(arg_name)) {
|
||||||
warning_("this function can only be used in R >= 3.2", call = call)
|
warning_("this function can only be used in R >= 3.2", call = call)
|
||||||
return(data.frame())
|
return(data.frame())
|
||||||
|
|
|
@ -164,7 +164,7 @@ ab_selector <- function(ab_class, function_name) {
|
||||||
meet_criteria(ab_class, allow_class = "character", has_length = 1, .call_depth = 1)
|
meet_criteria(ab_class, allow_class = "character", has_length = 1, .call_depth = 1)
|
||||||
meet_criteria(function_name, allow_class = "character", has_length = 1, .call_depth = 1)
|
meet_criteria(function_name, allow_class = "character", has_length = 1, .call_depth = 1)
|
||||||
|
|
||||||
if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 100) < 3.2) {
|
if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2) {
|
||||||
warning_(function_name, "() can only be used in R >= 3.2", call = FALSE)
|
warning_(function_name, "() can only be used in R >= 3.2", call = FALSE)
|
||||||
return(NULL)
|
return(NULL)
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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-1409059" class="section level1">
|
<div id="amr-1409060" class="section level1">
|
||||||
<h1 class="page-header" data-toc-text="1.4.0.9059">
|
<h1 class="page-header" data-toc-text="1.4.0.9060">
|
||||||
<a href="#amr-1409059" class="anchor"></a>AMR 1.4.0.9059<small> Unreleased </small>
|
<a href="#amr-1409060" class="anchor"></a>AMR 1.4.0.9060<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="last-updated-4-january-2021" class="section level2">
|
<div id="last-updated-4-january-2021" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
|
|
|
@ -12,7 +12,7 @@ articles:
|
||||||
datasets: datasets.html
|
datasets: datasets.html
|
||||||
resistance_predict: resistance_predict.html
|
resistance_predict: resistance_predict.html
|
||||||
welcome_to_AMR: welcome_to_AMR.html
|
welcome_to_AMR: welcome_to_AMR.html
|
||||||
last_built: 2021-01-04T11:28Z
|
last_built: 2021-01-04T12:36Z
|
||||||
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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</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.4.0.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9060</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -105,12 +105,13 @@ test_that("imports work", {
|
||||||
|
|
||||||
import_functions <- c(import_functions, call_functions)
|
import_functions <- c(import_functions, call_functions)
|
||||||
|
|
||||||
# check if all are in Suggests field
|
|
||||||
expect_true(all(unique(import_functions) %in% strsplit(packageDescription("AMR")$Suggests, ",\n")[[1]]))
|
|
||||||
|
|
||||||
for (i in seq_len(length(import_functions))) {
|
for (i in seq_len(length(import_functions))) {
|
||||||
fn <- names(import_functions)[i]
|
fn <- names(import_functions)[i]
|
||||||
pkg <- unname(import_functions[i])
|
pkg <- unname(import_functions[i])
|
||||||
|
# package should be in Suggests field of DESCRIPTION
|
||||||
|
expect(pkg %in% strsplit(packageDescription("AMR")$Suggests, ",\n")[[1]],
|
||||||
|
failure_message = paste0("Package ", pkg, " is not in Suggests field"))
|
||||||
|
# function should exist in foreign pkg namespace
|
||||||
expect(!is.null(import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)),
|
expect(!is.null(import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)),
|
||||||
failure_message = paste0("Function ", pkg, "::", fn, "() does not exist anymore"))
|
failure_message = paste0("Function ", pkg, "::", fn, "() does not exist anymore"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue