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
|
||||
Version: 1.4.0.9059
|
||||
Version: 1.4.0.9060
|
||||
Date: 2021-01-04
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
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>
|
||||
### 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()`):
|
||||
|
|
|
@ -527,7 +527,7 @@ meet_criteria <- function(object,
|
|||
}
|
||||
|
||||
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)) {
|
||||
warning_("this function can only be used in R >= 3.2", call = call)
|
||||
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(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)
|
||||
return(NULL)
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
@ -236,9 +236,9 @@
|
|||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div id="amr-1409059" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.4.0.9059">
|
||||
<a href="#amr-1409059" class="anchor"></a>AMR 1.4.0.9059<small> Unreleased </small>
|
||||
<div id="amr-1409060" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.4.0.9060">
|
||||
<a href="#amr-1409060" class="anchor"></a>AMR 1.4.0.9060<small> Unreleased </small>
|
||||
</h1>
|
||||
<div id="last-updated-4-january-2021" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
|
|
|
@ -12,7 +12,7 @@ articles:
|
|||
datasets: datasets.html
|
||||
resistance_predict: resistance_predict.html
|
||||
welcome_to_AMR: welcome_to_AMR.html
|
||||
last_built: 2021-01-04T11:28Z
|
||||
last_built: 2021-01-04T12:36Z
|
||||
urls:
|
||||
reference: https://msberends.github.io/AMR//reference
|
||||
article: https://msberends.github.io/AMR//articles
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</button>
|
||||
<span class="navbar-brand">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -105,12 +105,13 @@ test_that("imports work", {
|
|||
|
||||
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))) {
|
||||
fn <- names(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)),
|
||||
failure_message = paste0("Function ", pkg, "::", fn, "() does not exist anymore"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue