diff --git a/DESCRIPTION b/DESCRIPTION index 3c30d0df..c7bc1f63 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.2.0 -Date: 2020-05-28 +Version: 1.2.0.9000 +Date: 2020-06-02 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index ebf649cc..b941d20f 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ -# AMR 1.2.0 +# AMR 1.2.0.9000 +## Last updated: 02-Jun-2020 +### Changed +* Fixed a bug where `eucast_rules()` would not work on a tibble when the `tibble` or `dplyr` package was loaded +* Fixed a bug where `as.ab()` would return an error on invalid input values + +# AMR 1.2.0 ### Breaking * Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users. diff --git a/R/ab.R b/R/ab.R index 6c7ca3eb..baf11e39 100755 --- a/R/ab.R +++ b/R/ab.R @@ -103,21 +103,20 @@ as.ab <- function(x, ...) { x <- unique(x_bak_clean) x_new <- rep(NA_character_, length(x)) x_unknown <- character(0) - + for (i in seq_len(length(x))) { if (is.na(x[i]) | is.null(x[i])) { next } - if (identical(x[i], "")) { + if (identical(x[i], "") | + # no short names: + nchar(x[i]) <= 2 | + # prevent "bacteria" from coercing to TMP, since Bacterial is a brand name of it: + identical(tolower(x[i]), "bacteria")) { x_unknown <- c(x_unknown, x_bak[x[i] == x_bak_clean][1]) next } - # prevent "bacteria" from coercing to TMP, since Bacterial is a brand name of it - if (identical(tolower(x[i]), "bacteria")) { - x_unknown <- c(x_unknown, x_bak[x[i] == x_bak_clean][1]) - next - } - + # exact AB code found <- antibiotics[which(antibiotics$ab == toupper(x[i])), ]$ab if (length(found) > 0) { @@ -217,7 +216,7 @@ as.ab <- function(x, ...) { x_spelling <- gsub("(.)\\1+", "\\1+", x_spelling) # replace spaces and slashes with a possibility on both x_spelling <- gsub("[ /]", "( .*|.*/)", x_spelling) - + # try if name starts with it found <- antibiotics[which(antibiotics$name %like% paste0("^", x_spelling)), ]$ab if (length(found) > 0) { @@ -303,7 +302,7 @@ as.ab <- function(x, ...) { next } } - + # not found x_unknown <- c(x_unknown, x_bak[x[i] == x_bak_clean][1]) } diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 97f63ed5..efc39c49 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -518,6 +518,8 @@ eucast_rules <- function(x, # save original table x_original <- x + x_original_attr <- attributes(x) + x_original <- as.data.frame(x_original, stringsAsFactors = FALSE) # no tibbles, data.tables, etc. # join to microorganisms data set x <- as.data.frame(x, stringsAsFactors = FALSE) @@ -922,6 +924,8 @@ eucast_rules <- function(x, rownames(verbose_info) <- NULL verbose_info } else { + # reset original attributes + attributes(x_original) <- x_original_attr x_original } } diff --git a/R/filter_ab_class.R b/R/filter_ab_class.R index 3c524867..aa7a454c 100644 --- a/R/filter_ab_class.R +++ b/R/filter_ab_class.R @@ -70,6 +70,14 @@ filter_ab_class <- function(x, check_dataset_integrity() + if (!is.data.frame(x)) { + stop("`x` must be a data frame.", call. = FALSE) + } + + # save to return later + x_class <- class(x) + x <- as.data.frame(x, stringsAsFactors = FALSE) + scope <- scope[1L] if (is.null(result)) { result <- c("S", "I", "R") @@ -116,13 +124,16 @@ filter_ab_class <- function(x, } message(font_blue(paste0("Filtering on ", ab_group, ": ", scope, paste0(font_bold(paste0("`", vars_df, "`"), collapse = NULL), collapse = scope_txt), operator, toString(result)))) - x[as.logical(by(x, seq_len(nrow(x)), function(row) scope_fn(unlist(row[, vars_df]) %in% result, na.rm = TRUE))), , drop = FALSE] + filtered <<- as.logical(by(x, seq_len(nrow(x)), + function(row) scope_fn(unlist(row[, vars_df]) %in% result, na.rm = TRUE))) + x <- x[which(filtered), , drop = FALSE] } else { message(font_blue(paste0("NOTE: no antimicrobial agents of class ", ab_group, " (such as ", find_ab_names(ab_group), ") found, data left unchanged."))) - x } + class(x) <- x_class + x } #' @rdname filter_ab_class diff --git a/docs/404.html b/docs/404.html index 528cd0c4..a142f5ad 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 351386e6..e5df0e43 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000 diff --git a/docs/articles/index.html b/docs/articles/index.html index a46a3176..76f9b45b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000 diff --git a/docs/authors.html b/docs/authors.html index 5e489fbd..b878a3e7 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000 diff --git a/docs/index.html b/docs/index.html index 7758a052..31c5afe2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000 @@ -186,9 +186,9 @@
-
+

METHODS PAPER PREPRINTED
@@ -278,9 +278,9 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/

NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.

Read more about the data from WHOCC in our manual.

-
+

-WHONET / EARS-Net

+WHONET / EARS-Net

We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an example data set WHONET with the exact same structure as a WHONET export file. Furthermore, this package also contains a data set antibiotics with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.

Read our tutorial about how to work with WHONET data here.

diff --git a/docs/news/index.html b/docs/news/index.html index 315a90ca..25f03586 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000
@@ -229,9 +229,27 @@ Source: NEWS.md
-
+
+

+AMR 1.2.0.9000 Unreleased +

+
+

+Last updated: 02-Jun-2020 +

+
+

+Changed

+
    +
  • Fixed a bug where eucast_rules() would not work on a tibble when the tibble or dplyr package was loaded
  • +
  • Fixed a bug where as.ab() would return an error on invalid input values
  • +
+
+
+
+

-AMR 1.2.0 Unreleased +AMR 1.2.0 2020-05-28

@@ -240,7 +258,7 @@
  • Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.

    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: +

    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().
    • 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.
    • @@ -250,9 +268,9 @@ Negative effects of this change are:
  • -
    +

    -Changed

    +Changed
    • Taxonomy:
        @@ -275,7 +293,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
    • Added function ab_url() to return the direct URL of an antimicrobial agent from the official WHO website
    • -
    • Improvements for algorithm in as.ab(), so that e.g. as.ab("ampi sul") and ab_name("ampi sul") work
    • +
    • Improvements for algorithm in as.ab(), so that e.g. as.ab("ampi sul") and ab_name("ampi sul") work
    • Functions ab_atc() and ab_group() now return NA if no antimicrobial agent could be found
    • Small fix for some text input that could not be coerced as valid MIC values
    • Fix for interpretation of generic CLSI interpretation rules (thanks to Anthony Underwood)
    • @@ -293,9 +311,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
    -
    +

    -AMR 1.1.0 2020-04-15 +AMR 1.1.0 2020-04-15

    @@ -305,9 +323,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • Plotting biplots for principal component analysis using the new ggplot_pca() function
  • -
    +

    -Changed

    +Changed
    • Improvements for the algorithm used by as.mo() (and consequently all mo_* functions, that use as.mo() internally):
        @@ -335,15 +353,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
    -
    +

    -AMR 1.0.1 2020-02-23 +AMR 1.0.1 2020-02-23

    -
    +

    -Changed

    +Changed
      -
    • Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline
    • +
    • Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline

    • Interpretation from MIC values (and disk zones) to R/SI can now be used with mutate_at() of the dplyr package:

      yourdata %>%
      @@ -352,15 +370,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
       yourdata %>%
         mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = .$mybacteria)
    • -
    • Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole
    • -
    • Added uti (as abbreviation of urinary tract infections) as parameter to as.rsi(), so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs
    • +
    • Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole

    • +
    • Added uti (as abbreviation of urinary tract infections) as parameter to as.rsi(), so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs

    • Info printing in functions eucast_rules(), first_isolate(), mdro() and resistance_predict() will now at default only print when R is in an interactive mode (i.e. not in RMarkdown)

    -
    +

    -AMR 1.0.0 2020-02-17 +AMR 1.0.0 2020-02-17

    This software is now out of beta and considered stable. Nonetheless, this package will be developed continually.

    @@ -417,7 +435,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • Changes to the antibiotics data set (thanks to Peter Dutey):
  • @@ -433,9 +451,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
    -
    +

    -AMR 0.9.0 2019-11-29 +AMR 0.9.0 2019-11-29

    @@ -466,7 +484,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/ amox_clav = resistance(AMC)) %>% filter(!is.na(amoxicillin) | !is.na(amox_clav))

    -
  • Support for a new MDRO guideline: Magiorakos AP, Srinivasan A et al. “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012). +
  • +

    Support for a new MDRO guideline: Magiorakos AP, Srinivasan A et al. “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).

    • This is now the new default guideline for the mdro() function
    • The new Verbose mode (mdro(...., verbose = TRUE)) returns an informative data set where the reason for MDRO determination is given for every isolate, and an list of the resistant antimicrobial agents
    • @@ -481,8 +500,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
      • Improvements to algorithm in as.mo():
          -
        • Now allows “ou” where “au” should have been used and vice versa
        • -
        • More intelligent way of coping with some consonants like “l” and “r”
        • +
        • Now allows “ou” where “au” should have been used and vice versa

        • +
        • More intelligent way of coping with some consonants like “l” and “r”

        • Added a score (a certainty percentage) to mo_uncertainties(), that is calculated using the Levenshtein distance:

          as.mo(c("Stafylococcus aureus",
          @@ -532,9 +551,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
           
  • -
    +

    -AMR 0.8.0 2019-10-15 +AMR 0.8.0 2019-10-15

    @@ -543,7 +562,8 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
  • Determination of first isolates now excludes all ‘unknown’ microorganisms at default, i.e. microbial code "UNKNOWN". They can be included with the new parameter include_unknown:

    first_isolate(..., include_unknown = TRUE)
    -For WHONET users, this means that all records/isolates with organism code "con" (contamination) will be excluded at default, since as.mo("con") = "UNKNOWN". The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.
  • +

    For WHONET users, this means that all records/isolates with organism code "con" (contamination) will be excluded at default, since as.mo("con") = "UNKNOWN". The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.

    +
  • For code consistency, classes ab and mo will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in NA:

    # how it works in base R:
    @@ -557,8 +577,9 @@ For WHONET users, this means that all records/isolates with organism code 
     x[1] <- "testvalue"
     #> Warning message:
     #> 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).
  • +

    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).

  • Renamed data set septic_patients to example_isolates

  • @@ -609,7 +630,8 @@ This is important, because a value like "testvalue" could never be # R <NA> - - - - # <NA> <NA> - - - - # --------------------------------------------------------------------
    -Since this is a major change, usage of the old also_single_tested will throw an informative error that it has been replaced by only_all_tested. +

    Since this is a major change, usage of the old also_single_tested will throw an informative error that it has been replaced by only_all_tested.

    +
  • tibble printing support for classes rsi, mic, disk, ab mo. When using tibbles containing antimicrobial columns, values S will print in green, values I will print in yellow and values R will print in red. Microbial IDs (class mo) will emphasise on the genus and species, not on the kingdom.

    # (run this on your own console, as this page does not support colour printing)
    @@ -620,9 +642,9 @@ Since this is a major change, usage of the old also_single_tested w
     
  • -
    +

    -Changed

    +Changed
    • Many algorithm improvements for as.mo() (of which some led to additions to the microorganisms data set). Many thanks to all contributors that helped improving the algorithms.
        @@ -646,7 +668,7 @@ Since this is a major change, usage of the old also_single_tested w
      • Added more informative errors and warnings
      • Printed info now distinguishes between added and changes values
      • -
      • Using Verbose mode (i.e. eucast_rules(..., verbose = TRUE)) returns more informative and readable output
      • +
      • Using Verbose mode (i.e. eucast_rules(..., verbose = TRUE)) returns more informative and readable output
      • Using factors as input now adds missing factors levels when the function changes antibiotic results
    • @@ -683,9 +705,9 @@ Since this is a major change, usage of the old also_single_tested w
    -
    +

    -AMR 0.7.1 2019-06-23 +AMR 0.7.1 2019-06-23

    @@ -725,13 +747,13 @@ Since this is a major change, usage of the old also_single_tested w mo_gramstain("EHEC") # "Gram-negative"

    -
  • Function mo_info() as an analogy to ab_info(). The mo_info() prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism
  • +
  • Function mo_info() as an analogy to ab_info(). The mo_info() prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism

  • Function mo_synonyms() to get all previously accepted taxonomic names of a microorganism

  • -
    +

    -Changed

    +Changed
    • Column names of output count_df() and portion_df() are now lowercase
    • Fixed bug in translation of microorganism names
    • @@ -764,9 +786,9 @@ Since this is a major change, usage of the old also_single_tested w
    -
    +

    -AMR 0.7.0 2019-06-03 +AMR 0.7.0 2019-06-03

    @@ -778,48 +800,51 @@ Since this is a major change, usage of the old also_single_tested w
  • Added guidelines of the WHO to determine multi-drug resistance (MDR) for TB (mdr_tb()) and added a new vignette about MDR. Read this tutorial here on our website.
  • -
    +

    -Changed

    +Changed
      -
    • Fixed a critical bug in first_isolate() where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.
    • -
    • Fixed a bug in eucast_rules() where antibiotics from WHONET software would not be recognised
    • -
    • Completely reworked the antibiotics data set: +
    • Fixed a critical bug in first_isolate() where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.

    • +
    • Fixed a bug in eucast_rules() where antibiotics from WHONET software would not be recognised

    • +
    • +

      Completely reworked the antibiotics data set:

        -
      • All entries now have 3 different identifiers: +
      • +

        All entries now have 3 different identifiers:

        • Column ab contains a human readable EARS-Net code, used by ECDC and WHO/WHONET - this is the primary identifier used in this package
        • Column atc contains the ATC code, used by WHO/WHOCC
        • Column cid contains the CID code (Compound ID), used by PubChem
      • -
      • Based on the Compound ID, almost 5,000 official brand names have been added from many different countries
      • -
      • All references to antibiotics in our package now use EARS-Net codes, like AMX for amoxicillin
      • -
      • Functions atc_certe, ab_umcg and atc_trivial_nl have been removed
      • -
      • All atc_* functions are superceded by ab_* functions
      • +
      • Based on the Compound ID, almost 5,000 official brand names have been added from many different countries

      • +
      • All references to antibiotics in our package now use EARS-Net codes, like AMX for amoxicillin

      • +
      • Functions atc_certe, ab_umcg and atc_trivial_nl have been removed

      • +
      • All atc_* functions are superceded by ab_* functions

      • All output will be translated by using an included translation file which can be viewed here.

        -Please create an issue in one of our repositories if you want additions in this file.
      • +

        Please create an issue in one of our repositories if you want additions in this file.

        +
    • -
    • Improvements to plotting AMR results with ggplot_rsi(): +
    • +

      Improvements to plotting AMR results with ggplot_rsi():

      • New parameter colours to set the bar colours
      • New parameters title, subtitle, caption, x.title and y.title to set titles and axis descriptions
    • -
    • Improved intelligence of looking up antibiotic columns in a data set using guess_ab_col() -
    • -
    • Added ~5,000 more old taxonomic names to the microorganisms.old data set, which leads to better results finding when using the as.mo() function
    • -
    • This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as ‘increased exposure’ and not ‘intermediate’ anymore. For functions like portion_df() and count_df() this means that their new parameter combine_SI is TRUE at default. Our plotting function ggplot_rsi() also reflects this change since it uses count_df() internally.
    • -
    • 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()): +
    • Improved intelligence of looking up antibiotic columns in a data set using guess_ab_col()

    • +
    • Added ~5,000 more old taxonomic names to the microorganisms.old data set, which leads to better results finding when using the as.mo() function

    • +
    • This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as ‘increased exposure’ and not ‘intermediate’ anymore. For functions like portion_df() and count_df() this means that their new parameter combine_SI is TRUE at default. Our plotting function ggplot_rsi() also reflects this change since it uses count_df() internally.

    • +
    • 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()):

        -
      • speed improvement for microbial IDs
      • -
      • fixed factor level names for R Markdown
      • -
      • when all values are unique it now shows a message instead of a warning
      • +
      • speed improvement for microbial IDs

      • +
      • fixed factor level names for R Markdown

      • +
      • when all values are unique it now shows a message instead of a warning

      • support for boxplots:

        septic_patients %>%
        @@ -835,20 +860,17 @@ Please can be viewed here.

        -Please create an issue in one of our repositories if you want changes in this file.
      • -
      • Added ceftazidim intrinsic resistance to Streptococci +

        Please create an issue in one of our repositories if you want changes in this file.

      • -
      • 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 first_isolate() for when dates are missing
      • -
      • Improved speed of guess_ab_col() -
      • -
      • Function as.mo() now gently interprets any number of whitespace characters (like tabs) as one space
      • -
      • Function as.mo() now returns UNKNOWN for "con" (WHONET ID of ‘contamination’) and returns NA for "xxx"(WHONET ID of ‘no growth’)
      • -
      • Small algorithm fix for as.mo() -
      • -
      • Removed viruses from data set microorganisms.codes and cleaned it up
      • +
      • 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 first_isolate() for when dates are missing

      • +
      • Improved speed of guess_ab_col()

      • +
      • Function as.mo() now gently interprets any number of whitespace characters (like tabs) as one space

      • +
      • Function as.mo() now returns UNKNOWN for "con" (WHONET ID of ‘contamination’) and returns NA for "xxx"(WHONET ID of ‘no growth’)

      • +
      • Small algorithm fix for as.mo()

      • +
      • Removed viruses from data set microorganisms.codes and cleaned it up

      • Fix for mo_shortname() where species would not be determined correctly

    @@ -861,13 +883,13 @@ Please +

    -AMR 0.6.1 2019-03-29 +AMR 0.6.1 2019-03-29

    -
    +

    -Changed

    +Changed
    • Fixed a critical bug when using eucast_rules() with verbose = TRUE
    • @@ -875,9 +897,9 @@ Please +

      -AMR 0.6.0 2019-03-27 +AMR 0.6.0 2019-03-27

      New website!

      We’ve got a new website: https://msberends.gitlab.io/AMR (built with the great pkgdown)

      @@ -889,23 +911,25 @@ Please New
        +
      • BREAKING: removed deprecated functions, parameters and references to ‘bactid’. Use as.mo() to identify an MO code.

      • -BREAKING: removed deprecated functions, parameters and references to ‘bactid’. Use as.mo() to identify an MO code.
      • -
      • Catalogue of Life as a new taxonomic source for data about microorganisms, which also contains all ITIS data we used previously. The microorganisms data set now contains: +

        Catalogue of Life as a new taxonomic source for data about microorganisms, which also contains all ITIS data we used previously. The microorganisms data set now contains:

          -
        • All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa
        • -
        • All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales (covering at least like all species of Aspergillus, Candida, Pneumocystis, Saccharomyces and Trichophyton)
        • -
        • All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like Strongyloides and Taenia)
        • -
        • All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
        • +
        • All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa

        • +
        • All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales (covering at least like all species of Aspergillus, Candida, Pneumocystis, Saccharomyces and Trichophyton)

        • +
        • All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like Strongyloides and Taenia)

        • +
        • All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed

        • The responsible author(s) and year of scientific publication

          -This data is updated annually - check the included version with the new function catalogue_of_life_version().
        • -
        • Due to this change, some mo codes changed (e.g. Streptococcus changed from B_STRPTC to B_STRPT). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.
        • -
        • New function mo_rank() for the taxonomic rank (genus, species, infraspecies, etc.)
        • -
        • New function mo_url() to get the direct URL of a species from the Catalogue of Life
        • +

          This data is updated annually - check the included version with the new function catalogue_of_life_version().

          + +
        • Due to this change, some mo codes changed (e.g. Streptococcus changed from B_STRPTC to B_STRPT). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.

        • +
        • New function mo_rank() for the taxonomic rank (genus, species, infraspecies, etc.)

        • +
        • New function mo_url() to get the direct URL of a species from the Catalogue of Life

      • -
      • Support for data from WHONET and EARS-Net (European Antimicrobial Resistance Surveillance Network): +
      • +

        Support for data from WHONET and EARS-Net (European Antimicrobial Resistance Surveillance Network):

        • Exported files from WHONET can be read and used in this package. For functions like first_isolate() and eucast_rules(), all parameters will be filled in automatically.
        • This package now knows all antibiotic abbrevations by EARS-Net (which are also being used by WHONET) - the antibiotics data set now contains a column ears_net.
        • @@ -940,15 +964,16 @@ This data is updated annually - check the included version with the new function ab_certe -> atc_certe() ab_umcg -> atc_umcg() ab_tradenames -> atc_tradenames()
      -These functions use as.atc() internally. The old atc_property has been renamed atc_online_property(). This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo() and e.g. mo_genus. -
    • New functions set_mo_source() and get_mo_source() to use your own predefined MO codes as input for as.mo() and consequently all mo_* functions
    • -
    • Support for the upcoming dplyr version 0.8.0
    • -
    • New function guess_ab_col() to find an antibiotic column in a table
    • -
    • New function mo_failures() to review values that could not be coerced to a valid MO code, using as.mo(). This latter function will now only show a maximum of 10 uncoerced values and will refer to mo_failures().
    • -
    • New function mo_uncertainties() to review values that could be coerced to a valid MO code using as.mo(), but with uncertainty.
    • -
    • New function mo_renamed() to get a list of all returned values from as.mo() that have had taxonomic renaming
    • -
    • New function age() to calculate the (patients) age in years
    • -
    • New function age_groups() to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.
    • +

      These functions use as.atc() internally. The old atc_property has been renamed atc_online_property(). This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo() and e.g. mo_genus.

      + +
    • New functions set_mo_source() and get_mo_source() to use your own predefined MO codes as input for as.mo() and consequently all mo_* functions

    • +
    • Support for the upcoming dplyr version 0.8.0

    • +
    • New function guess_ab_col() to find an antibiotic column in a table

    • +
    • New function mo_failures() to review values that could not be coerced to a valid MO code, using as.mo(). This latter function will now only show a maximum of 10 uncoerced values and will refer to mo_failures().

    • +
    • New function mo_uncertainties() to review values that could be coerced to a valid MO code using as.mo(), but with uncertainty.

    • +
    • New function mo_renamed() to get a list of all returned values from as.mo() that have had taxonomic renaming

    • +
    • New function age() to calculate the (patients) age in years

    • +
    • New function age_groups() to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.

    • New function ggplot_rsi_predict() as well as the base R plot() function can now be used for resistance prediction calculated with resistance_predict():

      x <- resistance_predict(septic_patients, col_ab = "amox")
      @@ -966,14 +991,13 @@ These functions use as.atc() internally. The old atc_property
         filter(only_firsts == TRUE) %>%
         select(-only_firsts)
    • -
    • New function availability() to check the number of available (non-empty) results in a data.frame -
    • +
    • New function availability() to check the number of available (non-empty) results in a data.frame

    • New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.

    -
    +

    -Changed

    +Changed
    • Function eucast_rules():
        @@ -1010,10 +1034,10 @@ These functions use as.atc() internally. The old atc_property # also equal: as.mo(..., allow_uncertain = FALSE) as.mo(..., allow_uncertain = 0)
    -Using as.mo(..., allow_uncertain = 3) could lead to very unreliable results. -
  • Implemented the latest publication of Becker et al. (2019), for categorising coagulase-negative Staphylococci +

    Using as.mo(..., allow_uncertain = 3) could lead to very unreliable results.

  • -
  • All microbial IDs that found are now saved to a local file ~/.Rhistory_mo. Use the new function clean_mo_history() to delete this file, which resets the algorithms.
  • +
  • Implemented the latest publication of Becker et al. (2019), for categorising coagulase-negative Staphylococci

  • +
  • All microbial IDs that found are now saved to a local file ~/.Rhistory_mo. Use the new function clean_mo_history() to delete this file, which resets the algorithms.

  • Incoercible results will now be considered ‘unknown’, MO code UNKNOWN. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:

    mo_genus("qwerty", language = "es")
    @@ -1021,17 +1045,16 @@ Using as.mo(..., allow_uncertain = 3)# one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.
     #> [1] "(género desconocido)"
  • -
  • Fix for vector containing only empty values
  • -
  • Finds better results when input is in other languages
  • -
  • Better handling for subspecies
  • -
  • Better handling for Salmonellae, especially the ‘city like’ serovars like Salmonella London -
  • -
  • Understanding of highly virulent E. coli strains like EIEC, EPEC and STEC
  • -
  • There will be looked for uncertain results at default - these results will be returned with an informative warning
  • -
  • Manual (help page) now contains more info about the algorithms
  • -
  • Progress bar will be shown when it takes more than 3 seconds to get results
  • -
  • Support for formatted console text
  • -
  • Console will return the percentage of uncoercable input
  • +
  • Fix for vector containing only empty values

  • +
  • Finds better results when input is in other languages

  • +
  • Better handling for subspecies

  • +
  • Better handling for Salmonellae, especially the ‘city like’ serovars like Salmonella London

  • +
  • Understanding of highly virulent E. coli strains like EIEC, EPEC and STEC

  • +
  • There will be looked for uncertain results at default - these results will be returned with an informative warning

  • +
  • Manual (help page) now contains more info about the algorithms

  • +
  • Progress bar will be shown when it takes more than 3 seconds to get results

  • +
  • Support for formatted console text

  • +
  • Console will return the percentage of uncoercable input

  • Function first_isolate(): @@ -1079,17 +1102,15 @@ Using as.mo(..., allow_uncertain = 3)group_by(gender) %>% 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
  • -
  • Added header info for class mo to show unique count of families, genera and species
  • -
  • Now honours the decimal.mark setting, which just like format defaults to getOption("OutDec") -
  • -
  • The new big.mark parameter will at default be "," when decimal.mark = "." and "." otherwise
  • -
  • Fix for header text where all observations are NA -
  • -
  • New parameter droplevels to exclude empty factor levels when input is a factor
  • -
  • Factor levels will be in header when present in input data (maximum of 5)
  • -
  • Fix for using select() on frequency tables
  • +
  • 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

  • +
  • Added header info for class mo to show unique count of families, genera and species

  • +
  • Now honours the decimal.mark setting, which just like format defaults to getOption("OutDec")

  • +
  • The new big.mark parameter will at default be "," when decimal.mark = "." and "." otherwise

  • +
  • Fix for header text where all observations are NA

  • +
  • New parameter droplevels to exclude empty factor levels when input is a factor

  • +
  • Factor levels will be in header when present in input data (maximum of 5)

  • +
  • Fix for using select() on frequency tables

  • Function scale_y_percent() now contains the limits parameter
  • @@ -1108,9 +1129,9 @@ Using as.mo(..., allow_uncertain = 3)
    -
    +

    -AMR 0.5.0 2018-11-30 +AMR 0.5.0 2018-11-30

    @@ -1126,15 +1147,14 @@ Using as.mo(..., allow_uncertain = 3)Functions mo_authors and mo_year to get specific values about the scientific reference of a taxonomic entry

    -
    +

    -Changed

    +Changed
      -
    • Functions MDRO, BRMO, MRGN and EUCAST_exceptional_phenotypes were renamed to mdro, brmo, mrgn and eucast_exceptional_phenotypes -
    • +
    • Functions MDRO, BRMO, MRGN and EUCAST_exceptional_phenotypes were renamed to mdro, brmo, mrgn and eucast_exceptional_phenotypes

    • +
    • EUCAST_rules was renamed to eucast_rules, the old function still exists as a deprecated function

    • -EUCAST_rules was renamed to eucast_rules, the old function still exists as a deprecated function
    • -
    • Big changes to the eucast_rules function: +

      Big changes to the eucast_rules function:

      • Now also applies rules from the EUCAST ‘Breakpoint tables for bacteria’, version 8.1, 2018, http://www.eucast.org/clinical_breakpoints/ (see Source of the function)
      • New parameter rules to specify which rules should be applied (expert rules, breakpoints, others or all)
      • @@ -1146,10 +1166,9 @@ Using as.mo(..., allow_uncertain = 3)Small fixes to EUCAST clinical breakpoint rules
    • -
    • Added column kingdom to the microorganisms data set, and function mo_kingdom to look up values
    • -
    • Tremendous speed improvement for as.mo (and subsequently all mo_* functions), as empty values wil be ignored a priori -
    • -
    • Fewer than 3 characters as input for as.mo will return NA
    • +
    • Added column kingdom to the microorganisms data set, and function mo_kingdom to look up values

    • +
    • Tremendous speed improvement for as.mo (and subsequently all mo_* functions), as empty values wil be ignored a priori

    • +
    • Fewer than 3 characters as input for as.mo will return NA

    • Function as.mo (and all mo_* wrappers) now supports genus abbreviations with “species” attached

      as.mo("E. species")        # B_ESCHR
      @@ -1157,14 +1176,13 @@ Using as.mo(..., allow_uncertain = 3)as.mo("S. spp")            # B_STPHY
       mo_fullname("S. species")  # "Staphylococcus species"
    • -
    • Added parameter combine_IR (TRUE/FALSE) to functions portion_df and count_df, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)
    • -
    • Fix for portion_*(..., as_percent = TRUE) when minimal number of isolates would not be met
    • -
    • Added parameter also_single_tested for portion_* and count_* functions to also include cases where not all antibiotics were tested but at least one of the tested antibiotics includes the target antimicribial interpretation, see ?portion -
    • -
    • 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(): +
    • Added parameter combine_IR (TRUE/FALSE) to functions portion_df and count_df, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)

    • +
    • Fix for portion_*(..., as_percent = TRUE) when minimal number of isolates would not be met

    • +
    • Added parameter also_single_tested for portion_* and count_* functions to also include cases where not all antibiotics were tested but at least one of the tested antibiotics includes the target antimicribial interpretation, see ?portion

    • +
    • 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():

      • Support for grouping variables, test with:

        @@ -1178,29 +1196,25 @@ Using as.mo(..., allow_uncertain = 3)freq(hospital_id) %>% select(-count, -cum_count) # only get item, percent, cum_percent
    -
  • Check for hms::is.hms -
  • -
  • Now prints in markdown at default in non-interactive sessions
  • -
  • No longer adds the factor level column and sorts factors on count again
  • -
  • Support for class difftime -
  • -
  • New parameter na, to choose which character to print for empty values
  • -
  • New parameter header to turn the header info off (default when markdown = TRUE)
  • -
  • New parameter title to manually setbthe title of the frequency table
  • +
  • Check for hms::is.hms

  • +
  • Now prints in markdown at default in non-interactive sessions

  • +
  • No longer adds the factor level column and sorts factors on count again

  • +
  • Support for class difftime

  • +
  • New parameter na, to choose which character to print for empty values

  • +
  • New parameter header to turn the header info off (default when markdown = TRUE)

  • +
  • New parameter title to manually setbthe title of the frequency table

  • +
  • first_isolate now tries to find columns to use as input when parameters are left blank

  • +
  • Improvements for MDRO algorithm (function mdro)

  • +
  • Data set septic_patients is now a data.frame, not a tibble anymore

  • +
  • 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()

  • +
  • ggplot_rsi and scale_y_percent have breaks parameter

  • -first_isolate now tries to find columns to use as input when parameters are left blank
  • -
  • Improvements for MDRO algorithm (function mdro)
  • -
  • Data set septic_patients is now a data.frame, not a tibble anymore
  • -
  • 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() -
  • -
  • -ggplot_rsi and scale_y_percent have breaks parameter
  • -
  • AI improvements for as.mo: +

    AI improvements for as.mo:

  • -
  • Fix for join functions
  • -
  • Speed improvement for is.rsi.eligible, now 15-20 times faster
  • -
  • In g.test, when sum(x) is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggested
  • -
  • -ab_name will try to fall back on as.atc when no results are found
  • -
  • Removed the addin to view data sets
  • +
  • Fix for join functions

  • +
  • Speed improvement for is.rsi.eligible, now 15-20 times faster

  • +
  • In g.test, when sum(x) is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggested

  • +
  • ab_name will try to fall back on as.atc when no results are found

  • +
  • Removed the addin to view data sets

  • Percentages will now will rounded more logically (e.g. in freq function)

  • @@ -1235,16 +1248,17 @@ Using as.mo(..., allow_uncertain = 3)
    -
    +

    -AMR 0.4.0 2018-10-01 +AMR 0.4.0 2018-10-01

    New

      -
    • The data set microorganisms now contains all microbial taxonomic data from ITIS (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via https://itis.gov. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set microorganisms.old contains all previously known taxonomic names from those kingdoms.
    • -
    • New functions based on the existing function mo_property: +
    • The data set microorganisms now contains all microbial taxonomic data from ITIS (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via https://itis.gov. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set microorganisms.old contains all previously known taxonomic names from those kingdoms.

    • +
    • +

      New functions based on the existing function mo_property:

      • Taxonomic names: mo_phylum, mo_class, mo_order, mo_family, mo_genus, mo_species, mo_subspecies
      • @@ -1269,13 +1283,13 @@ Using as.mo(..., allow_uncertain = 3)# Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010) # [1] "Gram negative"
    -
  • Functions count_R, count_IR, count_I, count_SI and count_S to selectively count resistant or susceptible isolates +
  • +

    Functions count_R, count_IR, count_I, count_SI and count_S to selectively count resistant or susceptible isolates

    • Extra function count_df (which works like portion_df) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variables
  • -
  • Function is.rsi.eligible to check for columns that have valid antimicrobial results, but do not have the rsi class yet. Transform the columns of your raw data with: data %>% mutate_if(is.rsi.eligible, as.rsi) -
  • +
  • Function is.rsi.eligible to check for columns that have valid antimicrobial results, but do not have the rsi class yet. Transform the columns of your raw data with: data %>% mutate_if(is.rsi.eligible, as.rsi)

  • Functions as.mo and is.mo as replacements for as.bactid and is.bactid (since the microoganisms data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The as.mo function determines microbial IDs using intelligent rules:

    as.mo("E. coli")
    @@ -1291,8 +1305,9 @@ Using as.mo(..., allow_uncertain = 3)#         min       median         max  neval
     #  0.01817717  0.01843957  0.03878077    100
  • -
  • Added parameter reference_df for as.mo, so users can supply their own microbial IDs, name or codes as a reference table
  • -
  • Renamed all previous references to bactid to mo, like: +
  • Added parameter reference_df for as.mo, so users can supply their own microbial IDs, name or codes as a reference table

  • +
  • +

    Renamed all previous references to bactid to mo, like:

    • Column names inputs of EUCAST_rules, first_isolate and key_antibiotics
    • @@ -1301,20 +1316,19 @@ Using as.mo(..., allow_uncertain = 3)All old syntaxes will still work with this version, but will throw warnings
  • -
  • Function labels_rsi_count to print datalabels on a RSI ggplot2 model
  • +
  • Function labels_rsi_count to print datalabels on a RSI ggplot2 model

  • Functions as.atc and is.atc to transform/look up antibiotic ATC codes as defined by the WHO. The existing function guess_atc is now an alias of as.atc.

  • -
  • Function ab_property and its aliases: ab_name, ab_tradenames, ab_certe, ab_umcg and ab_trivial_nl -
  • -
  • Introduction to AMR as a vignette
  • -
  • Removed clipboard functions as it violated the CRAN policy
  • +
  • Function ab_property and its aliases: ab_name, ab_tradenames, ab_certe, ab_umcg and ab_trivial_nl

  • +
  • Introduction to AMR as a vignette

  • +
  • Removed clipboard functions as it violated the CRAN policy

  • Renamed septic_patients$sex to septic_patients$gender

  • -
    +

    -Changed

    +Changed
      -
    • Added three antimicrobial agents to the antibiotics data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)
    • +
    • Added three antimicrobial agents to the antibiotics data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)

    • Added 163 trade names to the antibiotics data set, it now contains 298 different trade names in total, e.g.:

      ab_official("Bactroban")
      @@ -1324,13 +1338,12 @@ Using as.mo(..., allow_uncertain = 3)ab_atc(c("Bactroban", "Amoxil", "Zithromax", "Floxapen"))
       # [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"
    • -
    • For first_isolate, rows will be ignored when there’s no species available
    • -
    • Function ratio is now deprecated and will be removed in a future release, as it is not really the scope of this package
    • -
    • Fix for as.mic for values ending in zeroes after a real number
    • -
    • Small fix where B. fragilis would not be found in the microorganisms.umcg data set
    • -
    • Added prevalence column to the microorganisms data set
    • -
    • Added parameters minimum and as_percent to portion_df -
    • +
    • For first_isolate, rows will be ignored when there’s no species available

    • +
    • Function ratio is now deprecated and will be removed in a future release, as it is not really the scope of this package

    • +
    • Fix for as.mic for values ending in zeroes after a real number

    • +
    • Small fix where B. fragilis would not be found in the microorganisms.umcg data set

    • +
    • Added prevalence column to the microorganisms data set

    • +
    • Added parameters minimum and as_percent to portion_df

    • Support for quasiquotation in the functions series count_* and portions_*, and n_rsi. This allows to check for more than 2 vectors or columns.

      septic_patients %>% select(amox, cipr) %>% count_IR()
      @@ -1341,16 +1354,14 @@ Using as.mo(..., allow_uncertain = 3)septic_patients %>% portion_S(amcl, gent)
       septic_patients %>% portion_S(amcl, gent, pita)
    • -
    • Edited ggplot_rsi and geom_rsi so they can cope with count_df. The new fun parameter has value portion_df at default, but can be set to count_df.
    • -
    • Fix for ggplot_rsi when the ggplot2 package was not loaded
    • -
    • Added datalabels function labels_rsi_count to ggplot_rsi -
    • -
    • Added possibility to set any parameter to geom_rsi (and ggplot_rsi) so you can set your own preferences
    • -
    • Fix for joins, where predefined suffices would not be honoured
    • -
    • Added parameter quote to the freq function
    • -
    • Added generic function diff for frequency tables
    • -
    • Added longest en shortest character length in the frequency table (freq) header of class character -
    • +
    • Edited ggplot_rsi and geom_rsi so they can cope with count_df. The new fun parameter has value portion_df at default, but can be set to count_df.

    • +
    • Fix for ggplot_rsi when the ggplot2 package was not loaded

    • +
    • Added datalabels function labels_rsi_count to ggplot_rsi

    • +
    • Added possibility to set any parameter to geom_rsi (and ggplot_rsi) so you can set your own preferences

    • +
    • Fix for joins, where predefined suffices would not be honoured

    • +
    • Added parameter quote to the freq function

    • +
    • Added generic function diff for frequency tables

    • +
    • Added longest en shortest character length in the frequency table (freq) header of class character

    • Support for types (classes) list and matrix for freq

      my_matrix = with(septic_patients, matrix(c(age, gender), ncol = 2))
      @@ -1370,9 +1381,9 @@ Using as.mo(..., allow_uncertain = 3)
       
    -
    +

    -AMR 0.3.0 2018-08-14 +AMR 0.3.0 2018-08-14

    @@ -1447,9 +1458,9 @@ Using as.mo(..., allow_uncertain = 3)

    -
    +

    -Changed

    +Changed
    • Improvements for forecasting with resistance_predict and added more examples
    • More antibiotics added as parameters for EUCAST rules
    • @@ -1477,7 +1488,7 @@ Using as.mo(..., allow_uncertain = 3)
    -
  • Now possible to coerce MIC values with a space between operator and value, i.e. as.mic("<= 0.002") now works
  • +
  • Now possible to coerce MIC values with a space between operator and value, i.e. as.mic("<= 0.002") now works
  • Classes rsi and mic do not add the attribute package.version anymore
  • Added "groups" option for atc_property(..., property). It will return a vector of the ATC hierarchy as defined by the WHO. The new function atc_groups is a convenient wrapper around this.
  • Build-in host check for atc_property as it requires the host set by url to be responsive
  • @@ -1507,9 +1518,9 @@ Using as.mo(..., allow_uncertain = 3)
    -
    +

    -AMR 0.2.0 2018-05-03 +AMR 0.2.0 2018-05-03

    @@ -1533,9 +1544,9 @@ Using as.mo(..., allow_uncertain = 3)New print format for tibbles and data.tables

    -
    +

    -Changed

    +Changed
    • Fixed rsi class for vectors that contain only invalid antimicrobial interpretations
    • Renamed dataset ablist to antibiotics @@ -1565,9 +1576,9 @@ Using as.mo(..., allow_uncertain = 3)
    -
    +

    -AMR 0.1.1 2018-03-14 +AMR 0.1.1 2018-03-14

    -
    +

    -AMR 0.1.0 2018-02-22 +AMR 0.1.0 2018-02-22

    • First submission to CRAN.
    • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index d5269520..36962fff 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 2.3.1 +pandoc: 2.7.3 pkgdown: 1.5.1 pkgdown_sha: ~ articles: @@ -10,7 +10,7 @@ articles: WHONET: WHONET.html benchmarks: benchmarks.html resistance_predict: resistance_predict.html -last_built: 2020-05-28T10:26Z +last_built: 2020-06-02T14:04Z urls: reference: https://msberends.gitlab.io/AMR/reference article: https://msberends.gitlab.io/AMR/articles diff --git a/docs/reference/index.html b/docs/reference/index.html index 2517794f..d7a23262 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0 + 1.2.0.9000