diff --git a/DESCRIPTION b/DESCRIPTION index 38933095..2e6fe735 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.7.1.9013 -Date: 2021-07-04 +Version: 1.7.1.9014 +Date: 2021-07-06 Title: Antimicrobial Resistance Data Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NAMESPACE b/NAMESPACE index 50e584a2..861eed8f 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -93,6 +93,7 @@ S3method(exp,mic) S3method(expm1,mic) S3method(floor,mic) S3method(format,bug_drug_combinations) +S3method(format,taxonomic_name) S3method(gamma,mic) S3method(hist,mic) S3method(kurtosis,data.frame) @@ -127,7 +128,12 @@ S3method(print,taxonomic_name) S3method(prod,mic) S3method(quantile,mic) S3method(range,mic) +S3method(rep,ab) +S3method(rep,disk) +S3method(rep,mic) S3method(rep,mo) +S3method(rep,rsi) +S3method(rep,taxonomic_name) S3method(round,mic) S3method(sign,mic) S3method(signif,mic) diff --git a/NEWS.md b/NEWS.md index 18bdce54..f6ecc759 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# `AMR` 1.7.1.9013 -## Last updated: 4 July 2021 +# `AMR` 1.7.1.9014 +## Last updated: 6 July 2021 ### Changed * Antibiotic class selectors (see `ab_class()`) diff --git a/R/ab.R b/R/ab.R index c99de647..05a94cde 100755 --- a/R/ab.R +++ b/R/ab.R @@ -580,6 +580,15 @@ unique.ab <- function(x, incomparables = FALSE, ...) { y } +#' @method rep ab +#' @export +#' @noRd +rep.ab <- function(x, ...) { + y <- NextMethod() + attributes(y) <- attributes(x) + y +} + generalise_antibiotic_name <- function(x) { x <- toupper(x) # remove suffices diff --git a/R/bug_drug_combinations.R b/R/bug_drug_combinations.R index 89592c5f..05c24384 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -113,7 +113,7 @@ bug_drug_combinations <- function(x, data.frame(S = m["S", ], I = m["I", ], R = m["R", ], stringsAsFactors = FALSE) }) merged <- do.call(rbind, pivot) - out_group <- data.frame(mo = unique_mo[i], + out_group <- data.frame(mo = rep(unique_mo[i], NROW(merged)), ab = rownames(merged), S = merged$S, I = merged$I, diff --git a/R/disk.R b/R/disk.R index 0f901bd8..064b83d8 100644 --- a/R/disk.R +++ b/R/disk.R @@ -195,6 +195,15 @@ unique.disk <- function(x, incomparables = FALSE, ...) { y } +#' @method rep disk +#' @export +#' @noRd +rep.disk <- function(x, ...) { + y <- NextMethod() + attributes(y) <- attributes(x) + y +} + # will be exported using s3_register() in R/zzz.R get_skimmers.disk <- function(column) { skimr::sfl( diff --git a/R/mic.R b/R/mic.R index c339c9ea..a944e7c1 100755 --- a/R/mic.R +++ b/R/mic.R @@ -320,6 +320,15 @@ unique.mic <- function(x, incomparables = FALSE, ...) { y } +#' @method rep mic +#' @export +#' @noRd +rep.mic <- function(x, ...) { + y <- NextMethod() + attributes(y) <- attributes(x) + y +} + #' @method sort mic #' @export #' @noRd @@ -337,7 +346,7 @@ sort.mic <- function(x, decreasing = FALSE, ...) { #' @export #' @noRd hist.mic <- function(x, ...) { - warning_("Use `plot()` or `ggplot()` for optimal plotting of MIC values", call = FALSE) + warning_("Use `plot()` or ggplot2's `autoplot()` for optimal plotting of MIC values", call = FALSE) hist(log2(x)) } diff --git a/R/mo_property.R b/R/mo_property.R index 17226ae6..5cb37cbb 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -48,7 +48,7 @@ #' #' Intrinsic resistance - [mo_is_intrinsic_resistant()] - will be determined based on the [intrinsic_resistant] data set, which is based on `r format_eucast_version_nr(3.2)`. The [mo_is_intrinsic_resistant()] functions can be vectorised over arguments `x` (input for microorganisms) and over `ab` (input for antibiotics). #' -#' The functions [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()] are returned with an additional class `taxonomic_name`, which allows italic printing in [tibbles][tibble::tibble()]. +#' The functions [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()] are returned with an additional class `taxonomic_name`, which allows italic printing in [tibbles][tibble::tibble()] and markdown tables such as with [knitr::kable()]. #' #' All output [will be translated][translate] where possible. #' @@ -786,9 +786,9 @@ print.taxonomic_name <- function(x, ...) { as.data.frame.taxonomic_name <- function(x, ...) { nm <- deparse1(substitute(x)) if (!"nm" %in% names(list(...))) { - as.data.frame(unclass(x), ..., nm = nm) + as.data.frame.vector(x, ..., nm = nm) } else { - as.data.frame(unclass(x), ...) + as.data.frame.vector(x, ...) } } @@ -801,12 +801,27 @@ type_sum.taxonomic_name <- function(x, ...) { pillar_shaft.taxonomic_name <- function(x, ...) { out <- format(x) hits <- tolower(x) %in% MO_lookup$fullname_lower | tolower(gsub("[^a-zA-Z ]", "", x)) %in% c(MO_lookup$g_species) - # grey out the kingdom (part until first "_") out[hits] <- font_italic(x[hits], collapse = NULL) out[is.na(x)] <- font_na(out[is.na(x)], collapse = NULL) create_pillar_column(out, align = "left") } +#' @method format taxonomic_name +#' @export +#' @noRd +format.taxonomic_name <- function(x, ...) { + # format only in case of markdown knitting + x <- unclass(x) + if (any(as.character(sys.calls()) %like% "(^|:| )kable\\(") || + tryCatch(!is.null(knitr::opts_knit$get("out.format")), error = function(e) FALSE) || + tryCatch(isTRUE(getOption('knitr.in.progress')), error = function(e) FALSE)) { + # perhaps this could be extended or better specified in the future? + hits <- tolower(x) %in% MO_lookup$fullname_lower | tolower(gsub("[^a-zA-Z ]", "", x)) %in% c(MO_lookup$g_species) + x[hits] <- paste0("*", x[hits], "*") + } + x +} + #' @method [ taxonomic_name #' @export #' @noRd @@ -856,3 +871,12 @@ unique.taxonomic_name <- function(x, incomparables = FALSE, ...) { attributes(y) <- attributes(x) y } + +#' @method rep taxonomic_name +#' @export +#' @noRd +rep.taxonomic_name <- function(x, ...) { + y <- NextMethod() + attributes(y) <- attributes(x) + y +} diff --git a/R/rsi.R b/R/rsi.R index ba20c141..12982cdc 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -1054,6 +1054,15 @@ unique.rsi <- function(x, incomparables = FALSE, ...) { y } +#' @method rep rsi +#' @export +#' @noRd +rep.rsi <- function(x, ...) { + y <- NextMethod() + attributes(y) <- attributes(x) + y +} + check_reference_data <- function(reference_data) { if (!identical(reference_data, AMR::rsi_translation)) { class_rsi <- vapply(FUN.VALUE = character(1), rsi_translation, function(x) paste0("<", class(x), ">", collapse = " and ")) diff --git a/R/sysdata.rda b/R/sysdata.rda index 8ab09c8f..56276449 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 3ca36cf9..cfa3954f 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/data-raw/translations.tsv b/data-raw/translations.tsv index 96d76f61..29e65e96 100644 --- a/data-raw/translations.tsv +++ b/data-raw/translations.tsv @@ -18,17 +18,17 @@ unknown subspecies TRUE TRUE FALSE TRUE unbekannte Unterart onbekende ondersoort unknown rank TRUE TRUE FALSE TRUE unbekannter Rang onbekende rang rango desconocido grado sconosciuto rang inconnu classificação desconhecido CoNS FALSE TRUE FALSE TRUE KNS CNS SCN CoPS FALSE TRUE FALSE TRUE KPS CPS SCP -Gram-negative TRUE TRUE FALSE FALSE Gramnegativ Gram-negatief Gram negativo Gram negativo Gram négatif Gram negativo -Gram-positive TRUE TRUE FALSE FALSE Grampositiv Gram-positief Gram positivo Gram positivo Gram positif Gram positivo -^Bacteria$ TRUE TRUE FALSE FALSE Bakterien Bacteriën Bacterias Batteri Bactéries Bactérias -^Fungi$ TRUE TRUE FALSE FALSE Pilze Schimmels Hongos Funghi Champignons Fungos -^Yeasts$ TRUE TRUE FALSE FALSE Hefen Gisten Levaduras Lieviti Levures Leveduras -^Protozoa$ TRUE TRUE FALSE FALSE Protozoen Protozoën Protozoarios Protozoi Protozoaires Protozoários -biogroup TRUE TRUE FALSE FALSE Biogruppe biogroep biogrupo biogruppo biogroupe biogrupo -biotype TRUE TRUE FALSE FALSE Biotyp biotipo biotipo biótipo -vegetative TRUE TRUE FALSE FALSE vegetativ vegetatief vegetativo vegetativo végétatif vegetativo -([([ ]*?)group TRUE TRUE FALSE FALSE \\1Gruppe \\1groep \\1grupo \\1gruppo \\1groupe \\1grupo -([([ ]*?)Group TRUE TRUE FALSE FALSE \\1Gruppe \\1Groep \\1Grupo \\1Gruppo \\1Groupe \\1Grupo +Gram-negative TRUE TRUE FALSE TRUE Gramnegativ Gram-negatief Gram negativo Gram negativo Gram négatif Gram negativo +Gram-positive TRUE TRUE FALSE TRUE Grampositiv Gram-positief Gram positivo Gram positivo Gram positif Gram positivo +^Bacteria$ TRUE TRUE FALSE TRUE Bakterien Bacteriën Bacterias Batteri Bactéries Bactérias +^Fungi$ TRUE TRUE FALSE TRUE Pilze Schimmels Hongos Funghi Champignons Fungos +^Yeasts$ TRUE TRUE FALSE TRUE Hefen Gisten Levaduras Lieviti Levures Leveduras +^Protozoa$ TRUE TRUE FALSE TRUE Protozoen Protozoën Protozoarios Protozoi Protozoaires Protozoários +biogroup TRUE TRUE FALSE TRUE Biogruppe biogroep biogrupo biogruppo biogroupe biogrupo +biotype TRUE TRUE FALSE TRUE Biotyp biotipo biotipo biótipo +vegetative TRUE TRUE FALSE TRUE vegetativ vegetatief vegetativo vegetativo végétatif vegetativo +([([ ]*?)group TRUE TRUE FALSE TRUE \\1Gruppe \\1groep \\1grupo \\1gruppo \\1groupe \\1grupo +([([ ]*?)Group TRUE TRUE FALSE TRUE \\1Gruppe \\1Groep \\1Grupo \\1Gruppo \\1Groupe \\1Grupo no .*growth TRUE FALSE FALSE FALSE keine? .*wachstum geen .*groei no .*crecimientonon sem .*crescimento pas .*croissance sem .*crescimento no|not TRUE FALSE FALSE FALSE keine? geen|niet no|sin sem non sem Susceptible TRUE FALSE FALSE FALSE Empfindlich Gevoelig Susceptible diff --git a/docs/404.html b/docs/404.html index bd5ebcce..f2c66511 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 04ce1862..6a916de0 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 5fe8eef4..3e3dac10 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 @@ -193,7 +193,7 @@

How to conduct AMR data analysis

Matthijs S. Berends

-

04 July 2021

+

06 July 2021

Source: vignettes/AMR.Rmd @@ -202,7 +202,7 @@ -

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 04 July 2021.

+

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 06 July 2021.

Introduction

@@ -233,21 +233,21 @@ -2021-07-04 +2021-07-06 abcd Escherichia coli S S -2021-07-04 +2021-07-06 abcd Escherichia coli S R -2021-07-04 +2021-07-06 efgh Escherichia coli R @@ -344,32 +344,32 @@ -2016-09-28 -A1 -Hospital A +2016-02-04 +V9 +Hospital B Escherichia coli S S S -R -M +S +F -2012-09-28 -J9 +2011-09-24 +D2 Hospital A Streptococcus pneumoniae -S +R S S S M -2011-10-02 -S7 -Hospital B -Klebsiella pneumoniae +2014-06-20 +Z9 +Hospital C +Staphylococcus aureus S S S @@ -377,9 +377,9 @@ F -2016-11-15 -U6 -Hospital A +2018-01-01 +P4 +Hospital C Escherichia coli R S @@ -388,26 +388,26 @@ F -2016-12-08 -B10 +2014-12-14 +W2 Hospital A Escherichia coli +R S S S -S -M +F -2010-05-10 -M2 -Hospital D -Escherichia coli +2016-07-27 +R6 +Hospital B +Staphylococcus aureus +R S +R S -S -S -M +F @@ -441,16 +441,16 @@ Longest: 1

1 M -10,434 -52.17% -10,434 -52.17% +10,365 +51.83% +10,365 +51.83% 2 F -9,566 -47.83% +9,635 +48.18% 20,000 100.00% @@ -505,9 +505,9 @@ Longest: 1

# ℹ Using column 'patient_id' as input for `col_patient_id`. # Basing inclusion on all antimicrobial results, using a points threshold of # 2 -# => Found 10,702 first weighted isolates (phenotype-based, 53.5% of total +# => Found 10,656 first weighted isolates (phenotype-based, 53.3% of total # where a microbial ID was available)
-

So only 53.5% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

+

So only 53.3% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

 data_1st <- data %>% 
   filter(first == TRUE)
@@ -515,7 +515,7 @@ Longest: 1

 data_1st <- data %>% 
   filter_first_isolate()
-

So we end up with 10,702 isolates for analysis. Now our data looks like:

+

So we end up with 10,656 isolates for analysis. Now our data looks like:

 head(data_1st)
@@ -531,7 +531,7 @@ Longest: 1

-+ @@ -553,73 +553,25 @@ Longest: 1

- - - - - - - - - - - - - - - - - - + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -628,26 +580,74 @@ Longest: 1

- + + + + + + + + + + + + + + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + +
12016-09-28A1Hospital AB_ESCHR_COLISSSRMGram-negativeEscherichiacoliTRUE
22012-09-28J92011-09-24D2 Hospital A B_STRPT_PNMNSSRR S R M Gram-positiveStreptococcusStreptococcus pneumoniae TRUE
52016-12-08B10Hospital AB_ESCHR_COLISSSSMGram-negativeEscherichiacoliTRUE
72015-04-29W8Hospital AB_ESCHR_COLIRSSRFGram-negativeEscherichiacoliTRUE
82010-06-19Q532014-06-20Z9 Hospital C B_STPHY_AURS S S F Gram-positiveStaphylococcusStaphylococcusaureusTRUE
62016-07-27R6Hospital BB_STPHY_AURSRSRSFGram-positiveStaphylococcus aureus TRUE
92010-08-20A8Hospital B72011-07-24W2Hospital A B_ESCHR_COLIIRRSRFGram-negativeEscherichiacoliTRUE
92012-01-12K9Hospital CB_ESCHR_COLIS S S S M Gram-negativeEscherichiaEscherichia coli TRUE
112013-03-11B6Hospital DB_KLBSL_PNMNRSRSMGram-negativeKlebsiellapneumoniaeTRUE

Time for the analysis!

@@ -669,8 +669,8 @@ Longest: 1

data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 10,702
-Available: 10,702 (100.0%, NA: 0 = 0.0%)
+Length: 10,656
+Available: 10,656 (100.0%, NA: 0 = 0.0%)
Unique: 4

Shortest: 16
Longest: 24

@@ -687,33 +687,33 @@ Longest: 24

1 Escherichia coli -4,661 -43.55% -4,661 -43.55% +4,664 +43.77% +4,664 +43.77% 2 Staphylococcus aureus -2,697 -25.20% -7,358 -68.75% +2,730 +25.62% +7,394 +69.39% 3 Streptococcus pneumoniae -2,145 -20.04% -9,503 -88.80% +2,093 +19.64% +9,487 +89.03% 4 Klebsiella pneumoniae -1,199 -11.20% -10,702 +1,169 +10.97% +10,656 100.00% @@ -732,14 +732,14 @@ Longest: 24

- + - + @@ -760,23 +760,38 @@ Longest: 24

-2016-09-28 -A1 +2011-09-24 +D2 Hospital A -B_ESCHR_COLI -S -S +B_STRPT_PNMN +R +R S R M -Gram-negative -Escherichia -coli +Gram-positive +Streptococcus +pneumoniae TRUE -2012-09-28 -J9 +2011-07-24 +W2 +Hospital A +B_ESCHR_COLI +R +R +S +R +F +Gram-negative +Escherichia +coli +TRUE + + +2011-03-17 +D5 Hospital A B_STRPT_PNMN S @@ -785,67 +800,52 @@ Longest: 24

R M Gram-positive -Streptococcus +Streptococcus pneumoniae TRUE - -2015-04-29 -W8 -Hospital A -B_ESCHR_COLI -R -S -S -R -F -Gram-negative -Escherichia -coli -TRUE - -2017-02-20 -P2 -Hospital C +2011-06-13 +X10 +Hospital D B_STRPT_PNMN -R -R -R +S +S +S R F Gram-positive -Streptococcus +Streptococcus pneumoniae TRUE -2010-09-14 -T8 -Hospital A -B_ESCHR_COLI -S -S -S -R -F -Gram-negative -Escherichia -coli -TRUE - - -2011-01-26 -K8 +2010-04-12 +Z4 Hospital B B_STRPT_PNMN +R +R S -S +R +F +Gram-positive +Streptococcus +pneumoniae +TRUE + + +2017-02-25 +B5 +Hospital B +B_STRPT_PNMN +I +I S R M Gram-positive -Streptococcus +Streptococcus pneumoniae TRUE @@ -868,52 +868,52 @@ Longest: 24

-E. coli +E. coli AMX -2209 -123 -2329 -4661 +2180 +145 +2339 +4664 -E. coli +E. coli AMC -3406 -165 -1090 -4661 +3360 +176 +1128 +4664 -E. coli +E. coli CIP -3416 +3405 0 -1245 -4661 +1259 +4664 -E. coli +E. coli GEN -4086 +4078 0 -575 -4661 +586 +4664 -K. pneumoniae +K. pneumoniae AMX 0 0 -1199 -1199 +1169 +1169 -K. pneumoniae +K. pneumoniae AMC -933 -39 -227 -1199 +924 +49 +196 +1169 @@ -934,36 +934,36 @@ Longest: 24

-E. coli +E. coli GEN -4086 +4078 0 -575 -4661 +586 +4664 -K. pneumoniae +K. pneumoniae GEN -1068 +1042 0 -131 -1199 +127 +1169 -S. aureus +S. aureus GEN -2407 +2440 0 290 -2697 +2730 -S. pneumoniae +S. pneumoniae GEN 0 0 -2145 -2145 +2093 +2093 @@ -977,7 +977,7 @@ Longest: 24

As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R(), equal to resistance()) and susceptibility as the proportion of S and I (proportion_SI(), equal to susceptibility()). These functions can be used on their own:

 data_1st %>% resistance(AMX)
-# [1] 0.5418613
+# [1] 0.5442005

Or can be used in conjunction with group_by() and summarise(), both from the dplyr package:

 data_1st %>% 
@@ -991,19 +991,19 @@ Longest: 24

Hospital A -0.5276730 +0.5512301 Hospital B -0.5422819 +0.5383792 Hospital C -0.5609308 +0.5587121 Hospital D -0.5475970 +0.5329877 @@ -1022,23 +1022,23 @@ Longest: 24

Hospital A -0.5276730 -3180 +0.5512301 +3211 Hospital B -0.5422819 -3725 +0.5383792 +3739 Hospital C -0.5609308 -1633 +0.5587121 +1584 Hospital D -0.5475970 -2164 +0.5329877 +2122 @@ -1058,28 +1058,28 @@ Longest: 24

-Escherichia -0.7661446 -0.8766359 -0.9759708 +Escherichia +0.7581475 +0.8743568 +0.9762007 -Klebsiella -0.8106756 -0.8907423 -0.9833194 +Klebsiella +0.8323353 +0.8913601 +0.9760479 -Staphylococcus -0.7942158 -0.8924731 -0.9818317 +Staphylococcus +0.7945055 +0.8937729 +0.9831502 -Streptococcus -0.5501166 +Streptococcus +0.5351171 0.0000000 -0.5501166 +0.5351171 @@ -1104,23 +1104,23 @@ Longest: 24

Hospital A -52.8% -26.0% +55.1% +27.0% Hospital B -54.2% -26.5% +53.8% +26.2% Hospital C -56.1% -26.7% +55.9% +27.7% Hospital D -54.8% -27.1% +53.3% +27.0% @@ -1204,19 +1204,16 @@ Longest: 24

mic_values <- random_mic(size = 100) mic_values # Class <mic> -# [1] 32 2 4 >=128 8 1 <=0.0625 >=128 -# [9] <=0.0625 <=0.0625 64 2 0.125 8 <=0.0625 0.125 -# [17] 64 >=128 >=128 16 32 2 8 32 -# [25] 0.5 0.5 16 8 >=128 2 16 >=128 -# [33] 0.5 2 64 64 16 <=0.0625 1 4 -# [41] 0.125 16 <=0.0625 0.125 0.25 0.125 8 4 -# [49] <=0.0625 32 1 <=0.0625 1 0.5 0.5 64 -# [57] 2 <=0.0625 8 <=0.0625 32 4 32 64 -# [65] 0.125 0.5 4 0.125 0.5 4 8 8 -# [73] 0.5 64 >=128 32 0.25 32 4 4 -# [81] 0.25 64 0.125 <=0.0625 2 1 2 <=0.0625 -# [89] 1 >=128 0.125 2 64 16 1 64 -# [97] 32 64 0.125 <=0.0625
+# [1] 1 16 8 0.5 64 0.125 4 2 0.25 16 +# [11] 8 64 0.25 64 0.25 0.25 0.125 1 0.5 4 +# [21] 64 0.0625 >=128 0.5 0.5 >=128 0.25 0.125 16 32 +# [31] 16 0.0625 4 8 4 >=128 4 0.25 0.0625 0.5 +# [41] 2 0.125 0.25 1 16 2 0.125 1 2 2 +# [51] 0.25 0.5 8 4 8 1 4 64 2 32 +# [61] 0.5 2 1 8 8 32 64 4 2 32 +# [71] >=128 1 64 4 64 8 8 64 0.125 0.0625 +# [81] 8 >=128 0.0625 0.0625 0.25 8 8 0.0625 32 0.25 +# [91] 32 0.0625 0.125 1 >=128 16 0.0625 8 0.0625 2
 # base R:
 plot(mic_values)
@@ -1245,10 +1242,10 @@ Longest: 24

# to review it. disk_values # Class <disk> -# [1] 23 19 31 23 17 26 25 27 18 29 30 27 25 23 28 27 28 26 20 22 28 21 22 25 23 -# [26] 18 20 22 19 30 22 20 23 21 20 24 28 25 31 29 24 21 31 21 23 24 30 17 27 23 -# [51] 18 24 27 27 22 17 20 26 22 28 28 26 27 26 21 17 28 27 19 21 22 26 17 21 18 -# [76] 28 22 25 30 29 19 17 29 29 24 29 30 28 17 23 25 28 17 27 28 25 23 22 19 24 +# [1] 25 19 26 17 25 27 22 17 29 29 27 28 21 18 26 29 21 27 24 17 18 19 23 19 21 +# [26] 18 23 21 27 29 18 25 24 17 31 18 22 25 30 19 29 26 27 22 22 28 21 23 22 20 +# [51] 30 19 23 21 30 17 19 22 18 25 29 28 25 31 20 23 20 22 27 24 21 21 24 19 31 +# [76] 19 18 27 20 27 21 25 26 29 27 29 21 27 27 25 20 22 25 26 29 19 19 23 19 20
 # base R:
 plot(disk_values, mo = "E. coli", ab = "cipro")
diff --git a/docs/articles/AMR_files/figure-html/disk_plots-1.png b/docs/articles/AMR_files/figure-html/disk_plots-1.png index dc2c9bc0..c8fab3e9 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots-1.png and b/docs/articles/AMR_files/figure-html/disk_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png index 55c5cb4c..d89b40e7 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-1.png b/docs/articles/AMR_files/figure-html/mic_plots-1.png index 5e62741b..e3e716cb 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-1.png and b/docs/articles/AMR_files/figure-html/mic_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-2.png b/docs/articles/AMR_files/figure-html/mic_plots-2.png index b4ede4e4..b69f5e2e 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-2.png and b/docs/articles/AMR_files/figure-html/mic_plots-2.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png index 6940679f..51d8e133 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png index 128926f8..cb7d9282 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png index 81aa40a8..de853609 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png index 519e5c78..99422cf5 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png index 749576a6..1997fe52 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png index 9e7261c4..cf648a3b 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index d64830ec..763b3aae 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 @@ -192,7 +192,7 @@ diff --git a/docs/authors.html b/docs/authors.html index 79f7f79c..7859cbd9 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 diff --git a/docs/index.html b/docs/index.html index 81e7f04e..499fd70a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 diff --git a/docs/news/index.html b/docs/news/index.html index ae661189..56288c69 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 @@ -236,12 +236,12 @@ Source: NEWS.md -
-

- Unreleased AMR 1.7.1.9013

-
+
+

+ Unreleased AMR 1.7.1.9014

+

-Last updated: 4 July 2021 +Last updated: 6 July 2021

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index aac2110a..95873ee6 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2021-07-04T20:09Z +last_built: 2021-07-06T14:34Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index be1558ac..0bf59865 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014

diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 3b4505ef..de09d0d6 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014
diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 7cf18d2a..3af26aa9 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.1.9011 + 1.7.1.9014
diff --git a/docs/reference/index.html b/docs/reference/index.html index 3e726817..65a9f73e 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014
diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 65226561..d1693a0e 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.1.9011 + 1.7.1.9014
@@ -352,7 +352,7 @@

The Gram stain - mo_gramstain() - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, PMID 11837318), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value NA. Functions mo_is_gram_negative() and mo_is_gram_positive() always return TRUE or FALSE (except when the input is NA or the MO code is UNKNOWN), thus always return FALSE for species outside the taxonomic kingdom of Bacteria.

Determination of yeasts - mo_is_yeast() - will be based on the taxonomic kingdom and class. Budding yeasts are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). True yeasts are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will return TRUE. It returns FALSE otherwise (except when the input is NA or the MO code is UNKNOWN).

Intrinsic resistance - mo_is_intrinsic_resistant() - will be determined based on the intrinsic_resistant data set, which is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020). The mo_is_intrinsic_resistant() functions can be vectorised over arguments x (input for microorganisms) and over ab (input for antibiotics).

-

The functions mo_family(), mo_genus(), mo_name(), mo_fullname() and mo_shortname() are returned with an additional class taxonomic_name, which allows italic printing in tibbles.

+

The functions mo_family(), mo_genus(), mo_name(), mo_fullname() and mo_shortname() are returned with an additional class taxonomic_name, which allows italic printing in tibbles and markdown tables such as with knitr::kable().

All output will be translated where possible.

The function mo_url() will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.

SNOMED codes - mo_snomed() - are from the US Edition of SNOMED CT from 1 September 2020. See Source and the microorganisms data set for more info.

diff --git a/docs/survey.html b/docs/survey.html index 84580e2d..77d54271 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.1.9013 + 1.7.1.9014 diff --git a/man/mo_property.Rd b/man/mo_property.Rd index 91bc7c1e..d602557f 100644 --- a/man/mo_property.Rd +++ b/man/mo_property.Rd @@ -131,7 +131,7 @@ Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be ba Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics). -The functions \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}} are returned with an additional class \code{taxonomic_name}, which allows italic printing in \link[tibble:tibble]{tibbles}. +The functions \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}} are returned with an additional class \code{taxonomic_name}, which allows italic printing in \link[tibble:tibble]{tibbles} and markdown tables such as with \code{\link[knitr:kable]{knitr::kable()}}. All output \link[=translate]{will be translated} where possible.