From c9fc7e8a45d40205cf41103bd026c69d0fe6e727 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Wed, 9 Dec 2020 09:40:50 +0100 Subject: [PATCH] (v1.4.0.9034) MIC printing update --- DESCRIPTION | 4 +- NEWS.md | 5 +- R/ab_from_text.R | 3 +- R/mic.R | 14 +- docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/EUCAST.html | 2 +- docs/articles/MDR.html | 58 ++++---- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 130 +++++++++--------- docs/news/index.html | 51 +++---- docs/pkgdown.yml | 2 +- docs/reference/ab_from_text.html | 5 +- .../reference/antibiotic_class_selectors.html | 2 +- docs/reference/as.mo.html | 2 +- docs/reference/catalogue_of_life.html | 2 +- docs/reference/catalogue_of_life_version.html | 2 +- docs/reference/first_isolate.html | 2 +- docs/reference/index.html | 2 +- docs/reference/is_new_episode.html | 2 +- docs/reference/key_antibiotics.html | 2 +- docs/reference/mdro.html | 2 +- docs/reference/microorganisms.codes.html | 2 +- docs/reference/microorganisms.html | 2 +- docs/reference/microorganisms.old.html | 2 +- docs/reference/mo_property.html | 2 +- docs/reference/resistance_predict.html | 2 +- docs/survey.html | 2 +- index.md | 37 ++--- man/ab_from_text.Rd | 3 +- 31 files changed, 178 insertions(+), 174 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1f54d386..129c2df1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.4.0.9033 -Date: 2020-12-08 +Version: 1.4.0.9034 +Date: 2020-12-09 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index d646153a..ca5d5331 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# AMR 1.4.0.9033 -## Last updated: 8 December 2020 +# AMR 1.4.0.9034 +## Last updated: 9 December 2020 ### New * Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package: @@ -35,6 +35,7 @@ * Fixed a bug where `as.mo()` would not return results for known laboratory codes for microorganisms * Fixed a bug where `as.ab()` would sometimes fail * If using `as.rsi()` on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this +* Better tibble printing for MIC values ### Other * All messages and warnings thrown by this package now break sentences on whole words diff --git a/R/ab_from_text.R b/R/ab_from_text.R index d12e4af9..c3149c98 100644 --- a/R/ab_from_text.R +++ b/R/ab_from_text.R @@ -63,7 +63,7 @@ #' ab_from_text("500 mg amoxi po and 400mg cipro iv", type = "admin") #' #' ab_from_text("500 mg amoxi po and 400mg cipro iv", collapse = ", ") -#' +#' \donttest{ #' # if you want to know which antibiotic groups were administered, do e.g.: #' abx <- ab_from_text("500 mg amoxi po and 400mg cipro iv") #' ab_group(abx[[1]]) @@ -86,6 +86,7 @@ #' collapse = "|")) #' #' } +#' } ab_from_text <- function(text, type = c("drug", "dose", "administration"), collapse = NULL, diff --git a/R/mic.R b/R/mic.R index 7db9e0e7..8c8e8ba3 100755 --- a/R/mic.R +++ b/R/mic.R @@ -155,21 +155,21 @@ is.mic <- function(x) { #' @export #' @noRd as.double.mic <- function(x, ...) { - as.double(gsub("(<|=|>)+", "", as.character(x))) + as.double(gsub("[<=>]+", "", as.character(x))) } #' @method as.integer mic #' @export #' @noRd as.integer.mic <- function(x, ...) { - as.integer(gsub("(<|=|>)+", "", as.character(x))) + as.integer(gsub("[<=>]+", "", as.character(x))) } #' @method as.numeric mic #' @export #' @noRd as.numeric.mic <- function(x, ...) { - as.numeric(gsub("(<|=|>)+", "", as.character(x))) + as.numeric(gsub("[<=>]+", "", as.character(x))) } #' @method droplevels mic @@ -183,9 +183,13 @@ droplevels.mic <- function(x, exclude = ifelse(anyNA(levels(x)), NULL, NA), ...) # will be exported using s3_register() in R/zzz.R pillar_shaft.mic <- function(x, ...) { - out <- trimws(format(x)) + crude_numbers <- as.double(x) + operators <- gsub("[^<=>]+", "", as.character(x)) + pasted <- trimws(paste0(operators, trimws(format(crude_numbers)))) + out <- pasted out[is.na(x)] <- font_na(NA) - create_pillar_column(out, align = "right", min_width = 4) + out <- gsub("(<|=|>)", font_silver("\\1"), out) + create_pillar_column(out, align = "right", width = max(nchar(pasted))) } # will be exported using s3_register() in R/zzz.R diff --git a/docs/404.html b/docs/404.html index 003d67d6..e7be93b2 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 99243f25..2872e249 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html index 204ae865..2942e1b7 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -39,7 +39,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 diff --git a/docs/articles/MDR.html b/docs/articles/MDR.html index 1b563f33..403d2f89 100644 --- a/docs/articles/MDR.html +++ b/docs/articles/MDR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 @@ -318,19 +318,19 @@ Unique: 2

 head(my_TB_data)
 #   rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin
-# 1          S         S            R          R            R            R
-# 2          R         S            S          R            S            S
-# 3          S         R            R          R            S            S
-# 4          S         S            S          S            S            S
-# 5          R         S            R          S            R            S
-# 6          S         S            R          S            S            S
+# 1          R         I            R          S            S            S
+# 2          S         R            I          R            R            S
+# 3          R         S            R          R            R            R
+# 4          R         S            I          R            I            S
+# 5          S         R            S          R            S            R
+# 6          R         R            S          R            S            S
 #   kanamycin
 # 1         R
-# 2         R
-# 3         R
+# 2         S
+# 3         S
 # 4         S
-# 5         S
-# 6         S
+# 5 R +# 6 R

We can now add the interpretation of MDR-TB to our data set. You can use:

 mdro(my_TB_data, guideline = "TB")
@@ -361,40 +361,40 @@ Unique: 5

1 Mono-resistant -3327 -66.54% -3327 -66.54% +3244 +64.88% +3244 +64.88% 2 Negative -632 -12.64% -3959 -79.18% +644 +12.88% +3888 +77.76% 3 Multi-drug-resistant -536 -10.72% -4495 -89.90% +613 +12.26% +4501 +90.02% 4 Poly-resistant -277 -5.54% -4772 -95.44% +304 +6.08% +4805 +96.10% 5 Extensively drug-resistant -228 -4.56% +195 +3.90% 5000 100.00% diff --git a/docs/articles/index.html b/docs/articles/index.html index c23a520e..be09514a 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/authors.html b/docs/authors.html index 9f81bf1f..b0dd7268 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/index.html b/docs/index.html index 11fa6196..e6e1c6fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 @@ -214,109 +214,103 @@ Since you are one of our users, we would like to know how you use the package an



-
+
-With AMR (for R), you’ll always have a knowledgeable microbiologist at your side!
-
-# AMR works great with dplyr, but it's not required or neccesary
-library(AMR)
-library(dplyr)
-
-example_isolates %>%
-  mutate(mo = mo_fullname(mo)) %>%
-  filter(mo_is_gram_positive()) %>%
-  select(mo, carbapenems(), glycopeptides())
-#> NOTE: Using column 'mo' as input for mo_is_gram_positive()
-#> Selecting cephalosporins: 'CAZ' (ceftazidime), 'CRO' (ceftriaxone),
-#>                           'CTX' (cefotaxime), 'CXM' (cefuroxime), 
-#>                           'CZO' (cefazolin), 'FEP' (cefepime),
-#>                           'FOX' (cefoxitin)
-#> Selecting glycopeptides: 'TEC' (teicoplanin), 'VAN' (vancomycin)
-

With only having defined a filter on Gram-positive micro-organisms (mo_is_gram_positive()) and a selection of two antibiotic groups (carbapenems() and glycopeptides()), the reference data about all bugs and drugs in the AMR package make sure you get what you meant:

+With AMR (for R), there’s always a knowledgeable microbiologist by your side! +
# AMR works great with dplyr, but it's not required or neccesary
+library(AMR)
+library(dplyr)
+
+example_isolates %>%
+  mutate(mo = mo_fullname(mo)) %>%
+  filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>%
+  select(mo, aminoglycosides(), carbapenems())
+#> NOTE: Using column 'mo' as input for mo_is_gram_negative()
+#> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant()
+#> Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), 
+                              'KAN' (kanamycin), 'TOB' (tobramycin)
+#> Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem)
+

With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (mo_is_gram_positive() and mo_is_intrinsic_resistant()) and a column selection on two antibiotic groups (aminoglycosides() and carbapenems()), the reference data about all microorganisms and all antibiotics in the AMR package make sure you get what you meant:

- - - - - - - - - + + + + + + - - - - - - - - + + + + + - - + + - - - - - + + - - - - - - - - + + + + + - + + + - - - - - - - - - + + + + + - - - - - + + + + + + + + + + + + + + + + @@ -462,7 +456,7 @@ Since you are one of our users, we would like to know how you use the package an
  • It analyses the data with convenient functions that use well-known methods.

    diff --git a/docs/news/index.html b/docs/news/index.html index 9f63d7a8..6f134a7c 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 @@ -236,13 +236,13 @@ Source: NEWS.md -
    -

    -AMR 1.4.0.9033 Unreleased +
    +

    +AMR 1.4.0.9034 Unreleased

    -
    +

    -Last updated: 8 December 2020 +Last updated: 9 December 2020

    @@ -287,6 +287,7 @@
  • Fixed a bug where as.mo() would not return results for known laboratory codes for microorganisms

  • Fixed a bug where as.ab() would sometimes fail

  • If using as.rsi() on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this

  • +
  • Better tibble printing for MIC values

  • @@ -496,7 +497,7 @@

    Making this package independent of especially the tidyverse (e.g. packages dplyr and tidyr) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.

    Negative effects of this change are:

      -
    • Function freq() that was borrowed from the cleaner package was removed. Use cleaner::freq(), or run library("cleaner") before you use freq().
    • +
    • Function freq() that was borrowed from the cleaner package was removed. Use cleaner::freq(), or run library("cleaner") before you use freq().
    • Printing values of class mo or rsi in a tibble will no longer be in colour and printing rsi in a tibble will show the class <ord>, not <rsi> anymore. This is purely a visual effect.
    • All functions from the mo_* family (like mo_name() and mo_gramstain()) are noticeably slower when running on hundreds of thousands of rows.
    • For developers: classes mo and ab now both also inherit class character, to support any data transformation. This change invalidates code that checks for class length == 1.
    • @@ -824,7 +825,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/ #> invalid microorganism code, NA generated

    This is important, because a value like "testvalue" could never be understood by e.g. mo_name(), although the class would suggest a valid microbial code.

  • -
  • Function freq() has moved to a new package, clean (CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq() function still works, since it is re-exported from the clean package (which will be installed automatically upon updating this AMR package).

  • +
  • Function freq() has moved to a new package, clean (CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq() function still works, since it is re-exported from the clean package (which will be installed automatically upon updating this AMR package).

  • Renamed data set septic_patients to example_isolates

  • @@ -1087,7 +1088,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • The age() function gained a new parameter exact to determine ages with decimals
  • Removed deprecated functions guess_mo(), guess_atc(), EUCAST_rules(), interpretive_reading(), rsi()
  • -
  • Frequency tables (freq()): +
  • Frequency tables (freq()):
    • speed improvement for microbial IDs

    • fixed factor level names for R Markdown

    • @@ -1096,12 +1097,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

      support for boxplots:

       septic_patients %>% 
      -  freq(age) %>% 
      +  freq(age) %>% 
         boxplot()
       # grouped boxplots:
       septic_patients %>% 
         group_by(hospital_id) %>% 
      -  freq(age) %>%
      +  freq(age) %>%
         boxplot()
    @@ -1111,7 +1112,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • Added ceftazidim intrinsic resistance to Streptococci
  • Changed default settings for age_groups(), to let groups of fives and tens end with 100+ instead of 120+
  • -
  • Fix for freq() for when all values are NA +
  • Fix for freq() for when all values are NA
  • Fix for first_isolate() for when dates are missing
  • Improved speed of guess_ab_col() @@ -1343,7 +1344,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • -
  • Frequency tables (freq() function): +
  • Frequency tables (freq() function):
    • Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:

      @@ -1352,15 +1353,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/ # OLD WAY septic_patients %>% mutate(genus = mo_genus(mo)) %>% - freq(genus) + freq(genus) # NEW WAY septic_patients %>% - freq(mo_genus(mo)) + freq(mo_genus(mo)) # Even supports grouping variables: septic_patients %>% group_by(gender) %>% - freq(mo_genus(mo)) + freq(mo_genus(mo))
    • Header info is now available as a list, with the header function

    • The parameter header is now set to TRUE at default, even for markdown

    • @@ -1442,20 +1443,20 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
    • Using portion_* functions now throws a warning when total available isolate is below parameter minimum

    • Functions as.mo, as.rsi, as.mic, as.atc and freq will not set package name as attribute anymore

    • -

      Frequency tables - freq():

      +

      Frequency tables - freq():

      • Support for grouping variables, test with:

         septic_patients %>% 
           group_by(hospital_id) %>% 
        -  freq(gender)
        + freq(gender)
      • Support for (un)selecting columns:

         septic_patients %>% 
        -  freq(hospital_id) %>% 
        +  freq(hospital_id) %>% 
           select(-count, -cum_count) # only get item, percent, cum_percent
      • Check for hms::is.hms

      • @@ -1473,7 +1474,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
      • Removed diacritics from all authors (columns microorganisms$ref and microorganisms.old$ref) to comply with CRAN policy to only allow ASCII characters

      • Fix for mo_property not working properly

      • Fix for eucast_rules where some Streptococci would become ceftazidime R in EUCAST rule 4.5

      • -
      • Support for named vectors of class mo, useful for top_freq()

      • +
      • Support for named vectors of class mo, useful for top_freq()

      • ggplot_rsi and scale_y_percent have breaks parameter

      • AI improvements for as.mo:

        @@ -1634,12 +1635,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

        Support for types (classes) list and matrix for freq

         my_matrix = with(septic_patients, matrix(c(age, gender), ncol = 2))
        -freq(my_matrix)
        +freq(my_matrix)

        For lists, subsetting is possible:

         my_list = list(age = septic_patients$age, gender = septic_patients$gender)
        -my_list %>% freq(age)
        -my_list %>% freq(gender)
        +my_list %>% freq(age) +my_list %>% freq(gender)
      @@ -1713,13 +1714,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
      • A vignette to explain its usage
      • Support for rsi (antimicrobial resistance) to use as input
      • -
      • Support for table to use as input: freq(table(x, y)) +
      • Support for table to use as input: freq(table(x, y))
      • Support for existing functions hist and plot to use a frequency table as input: hist(freq(df$age))
      • Support for as.vector, as.data.frame, as_tibble and format
      • -
      • Support for quasiquotation: freq(mydata, mycolumn) is the same as mydata %>% freq(mycolumn) +
      • Support for quasiquotation: freq(mydata, mycolumn) is the same as mydata %>% freq(mycolumn)
      • Function top_freq function to return the top/below n items as vector
      • Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)
      • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index c800554d..7d381094 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: 2020-12-08T11:37Z +last_built: 2020-12-09T08:37Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index a2c01c9f..9905f47b 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 @@ -323,7 +323,7 @@ The lifecycle of this function is maturing< ab_from_text("500 mg amoxi po and 400mg cipro iv", type = "admin") ab_from_text("500 mg amoxi po and 400mg cipro iv", collapse = ", ") - +# \donttest{ # if you want to know which antibiotic groups were administered, do e.g.: abx <- ab_from_text("500 mg amoxi po and 400mg cipro iv") ab_group(abx[[1]]) @@ -346,6 +346,7 @@ The lifecycle of this function is maturing< collapse = "|")) } +# } diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 12ff9aac..2af30a61 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 0cca5e08..ed298d2d 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index c03542ff..eb421a81 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.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index d48572e3..d0fd46cb 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 diff --git a/docs/reference/index.html b/docs/reference/index.html index cb67584b..3b1a04a5 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/is_new_episode.html b/docs/reference/is_new_episode.html index 3a94cf1e..8f624d66 100644 --- a/docs/reference/is_new_episode.html +++ b/docs/reference/is_new_episode.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index af60ae2b..a618d050 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9032 + 1.4.0.9034 diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index e107d19f..88d0900b 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 75e7064b..ee6c71af 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index c2da73b3..716ee8de 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index a2d90fb0..e7e8e4bf 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 1c8fe6f5..4da3b42a 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 5dc74f06..67f4df64 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/docs/survey.html b/docs/survey.html index 2e924c96..52dc6730 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9033 + 1.4.0.9034 diff --git a/index.md b/index.md index 7e8860dc..293cc20a 100644 --- a/index.md +++ b/index.md @@ -22,7 +22,7 @@ This package is [fully independent of any other R package](https://en.wikipedia. Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge.



        -##### With `AMR` (for R), you'll always have a knowledgeable microbiologist at your side! +##### With `AMR` (for R), there's always a knowledgeable microbiologist by your side! ```r # AMR works great with dplyr, but it's not required or neccesary @@ -31,26 +31,27 @@ library(dplyr) example_isolates %>% mutate(mo = mo_fullname(mo)) %>% - filter(mo_is_gram_positive()) %>% - select(mo, carbapenems(), glycopeptides()) -#> NOTE: Using column 'mo' as input for mo_is_gram_positive() -#> Selecting cephalosporins: 'CAZ' (ceftazidime), 'CRO' (ceftriaxone), -#> 'CTX' (cefotaxime), 'CXM' (cefuroxime), -#> 'CZO' (cefazolin), 'FEP' (cefepime), -#> 'FOX' (cefoxitin) -#> Selecting glycopeptides: 'TEC' (teicoplanin), 'VAN' (vancomycin) + filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>% + select(mo, aminoglycosides(), carbapenems()) +#> NOTE: Using column 'mo' as input for mo_is_gram_negative() +#> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant() +#> Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), + 'KAN' (kanamycin), 'TOB' (tobramycin) +#> Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem) ``` -With only having defined a filter on Gram-positive micro-organisms (`mo_is_gram_positive()`) and a selection of two antibiotic groups (`carbapenems()` and `glycopeptides()`), the reference data about [all bugs](./reference/microorganisms.html) and [drugs](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant: +With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_positive()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant: -| mo | CAZ | CRO | CTX | CXM | CZO | FEP | FOX | TEC | VAN | -|:-----------------------------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| *Enterococcus faecalis* | R | R | R | R | R | R | R | | S | -| *Enterococcus faecalis* | R | | R | R | R | R | R | | S | -| *Enterococcus faecalis* | R | R | R | R | R | R | R | | S | -| *Streptococcus* group B | R | S | S | S | S | S | S | | S | -| *Staphylococcus epidermidis* | R | | | S | | | | | S | -| *Enterococcus faecium* | R | R | R | R | R | R | R | | S | +| mo | AMK | GEN | KAN | TOB | IPM | MEM | +|:------------------------------|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:| +|*Pseudomonas aeruginosa* | | I | R | S | S | | +|*Pseudomonas aeruginosa* | | I | R | S | S | | +|*Pseudomonas aeruginosa* | | I | R | S | S | | +|*Pseudomonas aeruginosa* | S | S | R | S | | S | +|*Pseudomonas aeruginosa* | S | S | R | S | S | S | +|*Pseudomonas aeruginosa* | S | S | R | S | S | S | +|*Stenotrophomonas maltophilia* | R | R | R | R | R | R | +|*Pseudomonas aeruginosa* | S | S | R | S | | S |
  • moCAZCROCTXCXMCZOFEPFOXTECVANAMKGENKANTOBIPMMEM
    Enterococcus faecalisRRRRRRRPseudomonas aeruginosa IR SS
    Enterococcus faecalisRPseudomonas aeruginosa I RRRRR SS
    Enterococcus faecalisRRRRRRRPseudomonas aeruginosa IR SS
    -Streptococcus group BPseudomonas aeruginosaSS R SSSSSS S
    Staphylococcus epidermidisRPseudomonas aeruginosaSSRS S S
    Enterococcus faeciumPseudomonas aeruginosaSSRSSS
    Stenotrophomonas maltophilia R R R R R R
    Pseudomonas aeruginosaSS RS S