diff --git a/DESCRIPTION b/DESCRIPTION
index 10399d02..593eaf2e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.5.0.9030
+Version: 1.5.0.9031
Date: 2021-03-05
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(
diff --git a/NAMESPACE b/NAMESPACE
index 60de0112..9f3e549a 100755
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,5 +1,17 @@
# Generated by roxygen2: do not edit by hand
+S3method("!=",mic)
+S3method("%%",mic)
+S3method("%/%",mic)
+S3method("*",mic)
+S3method("+",mic)
+S3method("-",mic)
+S3method("/",mic)
+S3method("<",mic)
+S3method("<=",mic)
+S3method("==",mic)
+S3method(">",mic)
+S3method(">=",mic)
S3method("[",ab)
S3method("[",disk)
S3method("[",isolate_identifier)
@@ -22,7 +34,10 @@ S3method("[[<-",isolate_identifier)
S3method("[[<-",mic)
S3method("[[<-",mo)
S3method("[[<-",rsi)
+S3method("^",mic)
+S3method(all,mic)
S3method(all.equal,isolate_identifier)
+S3method(any,mic)
S3method(as.data.frame,ab)
S3method(as.data.frame,mo)
S3method(as.double,mic)
@@ -41,12 +56,19 @@ S3method(c,isolate_identifier)
S3method(c,mic)
S3method(c,mo)
S3method(c,rsi)
+S3method(ceiling,mic)
S3method(droplevels,mic)
S3method(droplevels,rsi)
+S3method(floor,mic)
S3method(format,bug_drug_combinations)
+S3method(hist,mic)
S3method(kurtosis,data.frame)
S3method(kurtosis,default)
S3method(kurtosis,matrix)
+S3method(max,mic)
+S3method(mean,mic)
+S3method(median,mic)
+S3method(min,mic)
S3method(plot,disk)
S3method(plot,mic)
S3method(plot,resistance_predict)
@@ -63,10 +85,14 @@ S3method(print,mo_renamed)
S3method(print,mo_uncertainties)
S3method(print,pca)
S3method(print,rsi)
+S3method(quantile,mic)
+S3method(range,mic)
S3method(rep,mo)
S3method(skewness,data.frame)
S3method(skewness,default)
S3method(skewness,matrix)
+S3method(sort,mic)
+S3method(sum,mic)
S3method(summary,mic)
S3method(summary,mo)
S3method(summary,pca)
diff --git a/NEWS.md b/NEWS.md
index 0f743a4e..d80d9ab4 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# AMR 1.5.0.9030
+# AMR 1.5.0.9031
## Last updated: 5 March 2021
### New
@@ -43,6 +43,7 @@
mo_type(c("Aspergillus", "Candida"), language = "es") # also supported: de, nl, fr, it, pt
#> [1] "Hongos" "Levaduras"
```
+* Added Pretomanid (PMD, J04AK08) to the `antibiotics` data set
### Changed
* Updated the bacterial taxonomy to 3 March 2021 (using [LSPN](https://lpsn.dsmz.de))
@@ -56,8 +57,8 @@
* `is.rsi()` and `is.rsi.eligible()` now return a vector of `TRUE`/`FALSE` when the input is a data set, by iterating over all columns
* Using functions without setting a data set (e.g., `mo_is_gram_negative()`, `mo_is_gram_positive()`, `mo_is_intrinsic_resistant()`, `first_isolate()`, `mdro()`) now work with `dplyr`s `group_by()` again
* `first_isolate()` can be used with `group_by()` (also when using a dot `.` as input for the data) and now returns the names of the groups
+* MIC values now allow for any mathematical processing, such as usage inside functions `min()`, `max()`, `range()`, and with binary operators (+, -, etc.). This also enables other functions, such as `fivenum()`.
* Updated the data set `microorganisms.codes` (which contains popular LIS and WHONET codes for microorganisms) for some species of *Mycobacterium* that previously incorrectly returned *M. africanum*
-* Added Pretomanid (PMD, J04AK08) to the `antibiotics` data set
* WHONET code `"PNV"` will now correctly be interpreted as `PHN`, the antibiotic code for phenoxymethylpenicillin ('peni V')
* Fix for verbose output of `mdro(..., verbose = TRUE)` for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only *P. aeruginosa*)
* `is.rsi.eligible()` now detects if the column name resembles an antibiotic name or code and now returns `TRUE` immediately if the input contains any of the values "R", "S" or "I". This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
diff --git a/R/amr.R b/R/amr.R
index 20f6fa0e..cae8b4c3 100644
--- a/R/amr.R
+++ b/R/amr.R
@@ -29,7 +29,7 @@
#' @details
#' `AMR` is a free, open-source and independent \R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
#'
-#' After installing this package, \R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
+#' After installing this package, \R knows `r format_included_data_number(microorganisms)` distinct microbial species and all `r format_included_data_number(rbind(antibiotics[, "atc", drop = FALSE], antivirals[, "atc", drop = FALSE]))` antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
#'
#' This package is fully independent of any other \R package and works on Windows, macOS and Linux with all versions of \R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice and University Medical Center Groningen. This \R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.
#'
diff --git a/R/catalogue_of_life.R b/R/catalogue_of_life.R
index 986b90e6..d3b2c265 100755
--- a/R/catalogue_of_life.R
+++ b/R/catalogue_of_life.R
@@ -44,7 +44,7 @@ format_included_data_number <- function(data) {
#' This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life.
#' @section Catalogue of Life:
#' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
-#' This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, ). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/CatalogueOfLife/general) is finished, which we await.
+#' This package contains the complete taxonomic tree of almost all microorganisms (`r format_included_data_number(microorganisms)` species) from the authoritative and comprehensive Catalogue of Life (CoL, ). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/CatalogueOfLife/general) is finished, which we await.
#'
#' [Click here][catalogue_of_life] for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with [catalogue_of_life_version()].
#' @section Included Taxa:
diff --git a/R/mic.R b/R/mic.R
index 3bfe19d2..66177588 100755
--- a/R/mic.R
+++ b/R/mic.R
@@ -42,6 +42,11 @@
#'
#' # this can also coerce combined MIC/RSI values:
#' as.mic("<=0.002; S") # will return <=0.002
+#'
+#' # mathematical processing treats MICs as numeric values
+#' fivenum(mic_data)
+#' quantile(mic_data)
+#' all(mic_data < 512)
#'
#' # interpret MIC values
#' as.rsi(x = as.mic(2),
@@ -276,6 +281,222 @@ unique.mic <- function(x, incomparables = FALSE, ...) {
y
}
+#' @method range mic
+#' @export
+#' @noRd
+range.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ out <- c(as.character(rng[1]), as.character(rng[length(rng)]))
+ as.double(as.mic(out))
+}
+
+#' @method min mic
+#' @export
+#' @noRd
+min.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ as.double(as.mic(as.character(rng[1])))
+}
+
+#' @method max mic
+#' @export
+#' @noRd
+max.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ as.double(as.mic(as.character(rng[length(rng)])))
+}
+
+#' @method sum mic
+#' @export
+#' @noRd
+sum.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ sum(as.double(rng))
+}
+
+#' @method all mic
+#' @export
+#' @noRd
+all.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ all(as.double(rng))
+}
+
+#' @method any mic
+#' @export
+#' @noRd
+any.mic <- function(..., na.rm = FALSE) {
+ rng <- sort(c(...))
+ if (na.rm == TRUE) {
+ rng <- rng[!is.na(rng)]
+ }
+ any(as.double(rng))
+}
+
+#' @method mean mic
+#' @export
+#' @noRd
+mean.mic <- function(x, na.rm = FALSE, ...) {
+ mean(as.double(x), na.rm = na.rm, ...)
+}
+
+#' @method median mic
+#' @export
+#' @noRd
+median.mic <- function(x, na.rm = FALSE, ...) {
+ median(as.double(x), na.rm = na.rm, ...)
+}
+
+#' @method quantile mic
+#' @export
+#' @noRd
+quantile.mic <- function(x, probs = seq(0, 1, 0.25), na.rm = FALSE,
+ names = TRUE, type = 7, ...) {
+ quantile(as.double(x), props = props, na.rm = na.rm, names = names, type = type, ...)
+}
+
+#' @method floor mic
+#' @export
+#' @noRd
+floor.mic <- function(x) {
+ floor(as.double(x))
+}
+
+#' @method ceiling mic
+#' @export
+#' @noRd
+ceiling.mic <- function(x) {
+ ceiling(as.double(x))
+}
+
+#' @method + mic
+#' @export
+#' @noRd
+`+.mic` <- function(e1, e2) {
+ as.double(e1) + as.double(e2)
+}
+
+#' @method - mic
+#' @export
+#' @noRd
+`-.mic` <- function(e1, e2) {
+ as.double(e1) - as.double(e2)
+}
+
+#' @method * mic
+#' @export
+#' @noRd
+`*.mic` <- function(e1, e2) {
+ as.double(e1) * as.double(e2)
+}
+
+#' @method / mic
+#' @export
+#' @noRd
+`/.mic` <- function(e1, e2) {
+ as.double(e1) / as.double(e2)
+}
+
+#' @method ^ mic
+#' @export
+#' @noRd
+`^.mic` <- function(e1, e2) {
+ as.double(e1) ^ as.double(e2)
+}
+
+#' @method %% mic
+#' @export
+#' @noRd
+`%%.mic` <- function(e1, e2) {
+ as.double(e1) %% as.double(e2)
+}
+
+#' @method %/% mic
+#' @export
+#' @noRd
+`%/%.mic` <- function(e1, e2) {
+ as.double(e1) %/% as.double(e2)
+}
+
+#' @method == mic
+#' @export
+#' @noRd
+`==.mic` <- function(e1, e2) {
+ as.double(e1) == as.double(e2)
+}
+
+#' @method != mic
+#' @export
+#' @noRd
+`!=.mic` <- function(e1, e2) {
+ as.double(e1) != as.double(e2)
+}
+
+#' @method < mic
+#' @export
+#' @noRd
+`<.mic` <- function(e1, e2) {
+ as.double(e1) < as.double(e2)
+}
+
+#' @method <= mic
+#' @export
+#' @noRd
+`<=.mic` <- function(e1, e2) {
+ as.double(e1) <= as.double(e2)
+}
+
+#' @method >= mic
+#' @export
+#' @noRd
+`>=.mic` <- function(e1, e2) {
+ as.double(e1) >= as.double(e2)
+}
+
+#' @method > mic
+#' @export
+#' @noRd
+`>.mic` <- function(e1, e2) {
+ as.double(e1) > as.double(e2)
+}
+
+#' @method sort mic
+#' @export
+#' @noRd
+sort.mic <- function(x, decreasing = FALSE, ...) {
+ if (decreasing == TRUE) {
+ ord <- order(-as.double(x))
+ } else {
+ ord <- order(as.double(x))
+ }
+ x[ord]
+}
+
+
+
+#' @method hist mic
+#' @export
+#' @noRd
+hist.mic <- function(x, ...) {
+ warning_("Use `plot()` or `ggplot()` for plotting MIC values", call = FALSE)
+ hist(as.double(x), ...)
+}
+
# will be exported using s3_register() in R/zzz.R
get_skimmers.mic <- function(column) {
skimr::sfl(
diff --git a/R/mo.R b/R/mo.R
index 5010b75b..5faf5b47 100755
--- a/R/mo.R
+++ b/R/mo.R
@@ -1474,8 +1474,8 @@ exec_as.mo <- function(x,
if (length(uncertainties$input) > 1) {
plural <- c("s", "them", "were")
}
- msg <- paste0("Translation to ", nr2char(length(uncertainties$input)), " microorganism", plural[1],
- " was guessed with uncertainty. Use `mo_uncertainties()` to review ", plural[2], ".")
+ msg <- paste0("Translation is uncertain of ", nr2char(length(uncertainties$input)), " microorganism", plural[1],
+ ". Use `mo_uncertainties()` to review ", plural[2], ".")
message_(msg)
}
x[already_known] <- x_known
diff --git a/R/plot.R b/R/plot.R
index 48dffc79..1fbaf3da 100644
--- a/R/plot.R
+++ b/R/plot.R
@@ -261,7 +261,6 @@ ggplot.mic <- function(data,
ggplot2::labs(title = title, x = xlab, y = ylab, subtitle = cols_sub$sub)
}
-
#' @method plot disk
#' @export
#' @importFrom graphics barplot axis mtext legend
diff --git a/R/random.R b/R/random.R
index bc3b6d17..b4db99a4 100644
--- a/R/random.R
+++ b/R/random.R
@@ -51,9 +51,9 @@
#' random_mic(100, "Klebsiella pneumoniae", "meropenem") # range 0.0625-16
#' random_mic(100, "Streptococcus pneumoniae", "meropenem") # range 0.0625-4
#'
-#' random_disk(100, "Klebsiella pneumoniae") # range 11-50
-#' random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 6-14
-#' random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 16-22
+#' random_disk(100, "Klebsiella pneumoniae") # range 8-50
+#' random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 11-17
+#' random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 12-27
#' }
random_mic <- function(size, mo = NULL, ab = NULL, ...) {
random_exec("MIC", size = size, mo = mo, ab = ab)
diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz
index 17ffa7f2..58082bf8 100644
Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ
diff --git a/docs/404.html b/docs/404.html
index ec86223d..aaec4254 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index 64188ba0..90b478fb 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html
index 30f7e18c..b1317cca 100644
--- a/docs/articles/datasets.html
+++ b/docs/articles/datasets.html
@@ -39,7 +39,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
@@ -211,7 +211,7 @@ If you are reading this page from within R, please Microorganisms (currently accepted names)
A data set with 70,026 rows and 16 columns, containing the following column names:
class, family, fullname, genus, kingdom, mo, order, phylum, prevalence, rank, ref, snomed, source, species, species_id and subspecies.
This data set is in R available as microorganisms
, after you load the AMR
package.
-It was last updated on 5 March 2021 09:32:45 CET. Find more info about the structure of this data set here.
+It was last updated on 5 March 2021 10:46:55 CET. Find more info about the structure of this data set here.
Direct download links:
- Download as R file (2.2 MB)
@@ -430,7 +430,7 @@ If you are reading this page from within R, please here.
+It was last updated on 5 March 2021 10:46:55 CET. Find more info about the structure of this data set here.
Direct download links:
- Download as R file (0.2 MB)
@@ -790,7 +790,7 @@ If you are reading this page from within R, please Intrinsic bacterial resistance
A data set with 93,892 rows and 2 columns, containing the following column names:
antibiotic and microorganism.
This data set is in R available as intrinsic_resistant
, after you load the AMR
package.
-It was last updated on 4 March 2021 22:25:17 CET. Find more info about the structure of this data set here.
+It was last updated on 5 March 2021 10:46:55 CET. Find more info about the structure of this data set here.
Direct download links:
- Download as R file (69 kB)
@@ -1005,7 +1005,7 @@ If you are reading this page from within R, please Interpretation from MIC values / disk diameters to R/SI
A data set with 20,486 rows and 10 columns, containing the following column names:
ab, breakpoint_R, breakpoint_S, disk_dose, guideline, method, mo, ref_tbl, site and uti.
This data set is in R available as rsi_translation
, after you load the AMR
package.
-It was last updated on 4 March 2021 22:24:46 CET. Find more info about the structure of this data set here.
+It was last updated on 5 March 2021 10:46:55 CET. Find more info about the structure of this data set here.
Direct download links:
- Download as R file (34 kB)
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 172f8734..1c81f590 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/authors.html b/docs/authors.html
index 46cfbeea..2d5ef948 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/index.html b/docs/index.html
index 0f7f80ea..17aa1cb3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -43,7 +43,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/news/index.html b/docs/news/index.html
index 8e66c23e..96a8ff0a 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
@@ -236,9 +236,9 @@
Source: NEWS.md
-
-
diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html
index 651d8fec..4f081f34 100644
--- a/docs/reference/catalogue_of_life.html
+++ b/docs/reference/catalogue_of_life.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9029
+ 1.5.0.9031
diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html
index b50b7b5d..95fcd695 100644
--- a/docs/reference/catalogue_of_life_version.html
+++ b/docs/reference/catalogue_of_life_version.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html
index 2c3bad5b..5c0a8299 100644
--- a/docs/reference/ggplot_rsi.html
+++ b/docs/reference/ggplot_rsi.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 77993e0f..20f7dab1 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html
index cb363bb4..fde7cf94 100644
--- a/docs/reference/microorganisms.codes.html
+++ b/docs/reference/microorganisms.codes.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html
index d590d94f..0e05d987 100644
--- a/docs/reference/microorganisms.html
+++ b/docs/reference/microorganisms.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9029
+ 1.5.0.9031
diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html
index f88b33d4..c274e02d 100644
--- a/docs/reference/microorganisms.old.html
+++ b/docs/reference/microorganisms.old.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html
index 5a1d5e89..8a79401f 100644
--- a/docs/reference/mo_property.html
+++ b/docs/reference/mo_property.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/plot.html b/docs/reference/plot.html
index 9c3de2ea..b1060767 100644
--- a/docs/reference/plot.html
+++ b/docs/reference/plot.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/reference/random.html b/docs/reference/random.html
index fabdb0a0..2ae80980 100644
--- a/docs/reference/random.html
+++ b/docs/reference/random.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9027
+ 1.5.0.9031
@@ -303,9 +303,9 @@ The lifecycle of this function is maturing<
random_mic(100, "Klebsiella pneumoniae", "meropenem") # range 0.0625-16
random_mic(100, "Streptococcus pneumoniae", "meropenem") # range 0.0625-4
-random_disk(100, "Klebsiella pneumoniae") # range 11-50
-random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 6-14
-random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 16-22
+random_disk(100, "Klebsiella pneumoniae") # range 8-50
+random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 11-17
+random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 12-27
# }
diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html
index 9852eb8a..0141ae6e 100644
--- a/docs/reference/rsi_translation.html
+++ b/docs/reference/rsi_translation.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.5.0.9028
+ 1.5.0.9031
diff --git a/docs/survey.html b/docs/survey.html
index 042bdfa6..1b8f50b1 100644
--- a/docs/survey.html
+++ b/docs/survey.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.5.0.9030
+ 1.5.0.9031
diff --git a/man/AMR.Rd b/man/AMR.Rd
index 801a9178..f2b58d1e 100644
--- a/man/AMR.Rd
+++ b/man/AMR.Rd
@@ -9,7 +9,7 @@ Welcome to the \code{AMR} package.
\details{
\code{AMR} is a free, open-source and independent \R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
-After installing this package, \R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
+After installing this package, \R knows ~70,000 distinct microbial species and all ~560 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
This package is fully independent of any other \R package and works on Windows, macOS and Linux with all versions of \R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice and University Medical Center Groningen. This \R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation.
diff --git a/man/as.mic.Rd b/man/as.mic.Rd
index 77ec57f6..93c91260 100755
--- a/man/as.mic.Rd
+++ b/man/as.mic.Rd
@@ -44,6 +44,11 @@ is.mic(mic_data)
# this can also coerce combined MIC/RSI values:
as.mic("<=0.002; S") # will return <=0.002
+# mathematical processing treats MICs as numeric values
+fivenum(mic_data)
+quantile(mic_data)
+all(mic_data < 512)
+
# interpret MIC values
as.rsi(x = as.mic(2),
mo = as.mo("S. pneumoniae"),
diff --git a/man/random.Rd b/man/random.Rd
index 5776869a..63a09483 100644
--- a/man/random.Rd
+++ b/man/random.Rd
@@ -57,8 +57,8 @@ random_mic(100, "Klebsiella pneumoniae") # range 0.0625-64
random_mic(100, "Klebsiella pneumoniae", "meropenem") # range 0.0625-16
random_mic(100, "Streptococcus pneumoniae", "meropenem") # range 0.0625-4
-random_disk(100, "Klebsiella pneumoniae") # range 11-50
-random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 6-14
-random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 16-22
+random_disk(100, "Klebsiella pneumoniae") # range 8-50
+random_disk(100, "Klebsiella pneumoniae", "ampicillin") # range 11-17
+random_disk(100, "Streptococcus pneumoniae", "ampicillin") # range 12-27
}
}