From 23ddc6004b4328c575f247edf85a7bc682a76eca Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 11 Dec 2020 09:05:03 +0100 Subject: [PATCH] (v1.4.0.9035) eucast_rules fix --- DESCRIPTION | 4 +-- NEWS.md | 4 +-- R/eucast_rules.R | 2 +- docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 50 ++++++++++++++++---------------- docs/pkgdown.yml | 2 +- docs/reference/ab_from_text.html | 2 +- docs/reference/index.html | 2 +- docs/survey.html | 2 +- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 129c2df1..6b6448cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.4.0.9034 -Date: 2020-12-09 +Version: 1.4.0.9035 +Date: 2020-12-11 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index ca5d5331..0e18f387 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# AMR 1.4.0.9034 -## Last updated: 9 December 2020 +# AMR 1.4.0.9035 +## Last updated: 11 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: diff --git a/R/eucast_rules.R b/R/eucast_rules.R index f44b248e..64950a65 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -621,7 +621,7 @@ eucast_rules <- function(x, if (info == TRUE) { cat(font_bold(paste0("\nRules by this AMR package (", font_red(paste0("v", utils::packageDescription("AMR")$Version, ", ", - format(utils::packageDescription("AMR")$Date, "%Y"))), "), see ?eucast_rules\n"))) + format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"))), "), see ?eucast_rules\n"))) } ab_enzyme <- subset(antibiotics, name %like% "/")[, c("ab", "name")] diff --git a/docs/404.html b/docs/404.html index e7be93b2..dfe7ed2b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 2872e249..7314b7ae 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 diff --git a/docs/articles/index.html b/docs/articles/index.html index be09514a..ce013bbd 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 diff --git a/docs/authors.html b/docs/authors.html index b0dd7268..ad8a6341 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 diff --git a/docs/index.html b/docs/index.html index e6e1c6fe..89de01e8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 diff --git a/docs/news/index.html b/docs/news/index.html index 6f134a7c..dc989bb8 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9034 + 1.4.0.9035 @@ -236,13 +236,13 @@ Source: NEWS.md -
-

-AMR 1.4.0.9034 Unreleased +
+

+AMR 1.4.0.9035 Unreleased

-
+

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

@@ -497,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.
  • @@ -825,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

  • @@ -1088,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

    • @@ -1097,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()
    @@ -1112,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() @@ -1344,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:

      @@ -1353,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

  • @@ -1443,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

  • @@ -1474,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:

    @@ -1635,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)
  • @@ -1714,13 +1714,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/