diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index c2df5cf4c..aa0128f0b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -171,5 +171,5 @@ jobs: if: always() uses: actions/upload-artifact@v2 with: - name: artifacts-r-${{ matrix.config.r }}-${{ matrix.config.os }} + name: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-artifacts path: AMR.Rcheck diff --git a/DESCRIPTION b/DESCRIPTION index f9a9748ee..63807d16b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.7.1.9029 -Date: 2021-08-21 +Version: 1.7.1.9030 +Date: 2021-08-29 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by diff --git a/NEWS.md b/NEWS.md index aa7a6f4a4..f1d62d840 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# `AMR` 1.7.1.9029 -## Last updated: 21 August 2021 +# `AMR` 1.7.1.9030 +## Last updated: 29 August 2021 ### Breaking changes * Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version @@ -12,11 +12,12 @@ ### Changed * The `antibiotics` data set now contains **all ATC codes** that are available through the [WHOCC website](https://www.whocc.no), regardless of drugs being present in more than one ATC group. This means that: * Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5) - * `antibiotics$atc` is now a `list` instead of a `character`, and this `atc` column was moved to the 5th position of the `antibiotics` data set - * `ab_atc()` does not always return a character vector with length 1, and returns a `list` if the input is larger than length 1 + * `antibiotics$atc` is now a `list` containing `character` vectors, and this `atc` column was moved to the 5th position of the `antibiotics` data set + * `ab_atc()` does not always return a character vector of length 1, and returns a `list` if the input is larger than length 1 + * `ab_info()` has a slightly different output * Some DDDs (daily defined doses) were added or updated according to newly included ATC codes * Antibiotic selectors - * They now also work in R-3.0 and R-3.1, supporting every version of R since 2013 + * They now also work in R-3.0 and R-3.1, supporting every version of R since 2013 like the rest of the package * Added more selectors for antibiotic classes: `aminopenicillins()`, `antifungals()`, `antimycobacterials()`, `lincosamides()`, `lipoglycopeptides()`, `polymyxins()`, `quinolones()`, `streptogramins()`, `trimethoprims()` and `ureidopenicillins()` * Added specific selectors for certain types for treatment: `administrable_per_os()` and `administrable_iv()`, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally): ```r @@ -30,8 +31,7 @@ ``` * Fix for using selectors multiple times in one call (e.g., using them in `dplyr::filter()` and immediately after in `dplyr::select()`) * Added argument `only_treatable`, which defaults to `TRUE` and will exclude drugs that are only for laboratory tests and not for treating patients (such as imipenem/EDTA and gentamicin-high) -* Fixed the Gram stain (`mo_gramstain()`) determination of the class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as *Negativicoccus* and *Veillonella*. -* Fix for duplicate ATC codes in the `antibiotics` data set +* Fixed the Gram stain (`mo_gramstain()`) determination of the taxonomic class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as *Negativicoccus* and *Veillonella*. * Fix to prevent introducing `NA`s for old MO codes when running `as.mo()` on them * Added more informative error messages when any of the `proportion_*()` and `count_*()` functions fail * When printing a tibble with any old MO code, a warning will be thrown that old codes should be updated using `as.mo()` diff --git a/R/ab_property.R b/R/ab_property.R index 93c308ba0..d7939610e 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -288,7 +288,7 @@ ab_ddd <- function(x, administration = "oral", ...) { units <- list(...)$units if (!is.null(units) && isTRUE(units)) { if (message_not_thrown_before("ab_ddd", entire_session = TRUE)) { - warning_("Using `ab_ddd(..., units = TRUE)` is deprecated, use `ab_ddd_units()` instead. ", + warning_("Using `ab_ddd(..., units = TRUE)` is deprecated, use `ab_ddd_units()` to retrieve units instead. ", "This warning will be shown once per session.", call = FALSE) } ddd_prop <- paste0(ddd_prop, "_units") @@ -297,7 +297,7 @@ ab_ddd <- function(x, administration = "oral", ...) { } out <- ab_validate(x = x, property = ddd_prop) - if (any(ab_name(x, language = NULL) %like% "/" & is.na(out)) ) { + if (any(ab_name(x, language = NULL) %like% "/" & is.na(out))) { warning_("DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package. ", "Please refer to the WHOCC website:\n", "www.whocc.no/ddd/list_of_ddds_combined_products/", call = FALSE) @@ -330,17 +330,18 @@ ab_info <- function(x, language = get_locale(), ...) { x <- as.ab(x, ...) list(ab = as.character(x), - atc = ab_atc(x), - cid = ab_cid(x), - name = ab_name(x, language = language), - group = ab_group(x, language = language), - atc_group1 = ab_atc_group1(x, language = language), - atc_group2 = ab_atc_group2(x, language = language), - tradenames = ab_tradenames(x), - ddd = list(oral = list(amount = ab_ddd(x, administration = "oral"), - units = ab_ddd_units(x, administration = "oral")), - iv = list(amount = ab_ddd(x, administration = "iv"), - units = ab_ddd_units(x, administration = "iv")))) + cid = ab_cid(x), + name = ab_name(x, language = language), + group = ab_group(x, language = language), + atc = ab_atc(x), + atc_group1 = ab_atc_group1(x, language = language), + atc_group2 = ab_atc_group2(x, language = language), + tradenames = ab_tradenames(x), + loinc = ab_loinc(x), + ddd = list(oral = list(amount = ab_ddd(x, administration = "oral"), + units = ab_ddd_units(x, administration = "oral")), + iv = list(amount = ab_ddd(x, administration = "iv"), + units = ab_ddd_units(x, administration = "iv")))) } diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 1028ad199..d1a048b80 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/404.html b/docs/404.html index 4eb001865..e6bfdad70 100644 --- a/docs/404.html +++ b/docs/404.html @@ -43,7 +43,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -173,13 +173,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 1140365c6..e7f642ac1 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -92,7 +92,7 @@ AMR (for R) - 1.7.1.9025 + 1.7.1.9030 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index bded04148..46fcbb4c8 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • @@ -198,7 +191,7 @@

    How to conduct AMR data analysis

    Matthijs S. Berends

    -

    17 August 2021

    +

    29 August 2021

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

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

    +

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

    Introduction

    @@ -238,21 +231,21 @@ -2021-08-17 +2021-08-29 abcd Escherichia coli S S -2021-08-17 +2021-08-29 abcd Escherichia coli S R -2021-08-17 +2021-08-29 efgh Escherichia coli R @@ -349,68 +342,68 @@ -2012-12-11 -B5 -Hospital D -Streptococcus pneumoniae -R -S -S -R -M - - -2012-01-03 -D5 -Hospital B -Escherichia coli -S -S -S -S -M - - -2013-03-20 -E3 +2012-06-29 +E6 Hospital A Escherichia coli -I -I -S -S -M - - -2017-02-14 -L5 -Hospital B -Klebsiella pneumoniae R S S S M - -2010-04-27 -Y6 + +2014-08-25 +D8 Hospital D -Escherichia coli +Klebsiella pneumoniae +R +I S S +M + + +2017-01-14 +V1 +Hospital C +Streptococcus pneumoniae +I +S S S F -2011-08-04 -O2 +2010-10-15 +X2 Hospital B Staphylococcus aureus +S +S +S +R +F + + +2011-04-05 +H6 +Hospital A +Streptococcus pneumoniae +S +I +S +S +M + + +2012-01-10 +Y7 +Hospital D +Streptococcus pneumoniae R S -S +R S F @@ -446,16 +439,16 @@ Longest: 1

    1 M -10,443 -52.22% -10,443 -52.22% +10,326 +51.63% +10,326 +51.63% 2 F -9,557 -47.79% +9,674 +48.37% 20,000 100.00% @@ -510,9 +503,9 @@ Longest: 1

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

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

    +

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

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

     data_1st <- data %>% 
       filter_first_isolate()
    -

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

    +

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

     head(data_1st)
    @@ -559,27 +552,11 @@ Longest: 1

    - - - - - - - - - - - - - - - - - - - + + + - + @@ -589,14 +566,14 @@ Longest: 1

    - - - - - + + + + + - + @@ -605,52 +582,68 @@ Longest: 1

    - - - - - - - - - - - - - - - - - - - + + + - + + - - + - - - - - + + + + + + + + + + + + + + + + + + + - + + + - - + + + + + + + + + + + + + + + + + + @@ -674,8 +667,8 @@ Longest: 1

    data_1st %>% freq(genus, species)

    Frequency table

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

    Shortest: 16
    Longest: 24

    @@ -692,33 +685,33 @@ Longest: 24

    - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + @@ -765,8 +758,83 @@ Longest: 24

    - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -779,81 +847,6 @@ Longest: 24

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    12012-12-11B5Hospital DB_STRPT_PNMNRRSRMGram-positiveStreptococcuspneumoniaeTRUE
    22012-01-03D5Hospital B2012-06-29E6Hospital A B_ESCHR_COLISR S S S coli TRUE
    42017-02-14L5Hospital B
    22014-08-25D8Hospital D B_KLBSL_PNMN RSI S S M pneumoniae TRUE
    72012-03-07I8Hospital BB_ESCHR_COLISSSSMGram-negativeEscherichiacoliTRUE
    92010-12-20H1042010-10-15X2 Hospital B B_STPHY_AURSRSS S RSMF Gram-positive Staphylococcus aureus TRUE
    112014-01-24M2Hospital BB_ESCHR_COLI62012-01-10Y7Hospital DB_STRPT_PNMN R R RRFGram-positiveStreptococcuspneumoniaeTRUE
    82016-02-07V2Hospital AB_KLBSL_PNMNR SMSSF Gram-negativeEscherichiacoliKlebsiellapneumoniaeTRUE
    102016-11-08D4Hospital AB_STPHY_AURSRSSSMGram-positiveStaphylococcusaureus TRUE
    1 Escherichia coli4,49442.37%4,49442.37%4,50742.64%4,50742.64%
    2 Staphylococcus aureus2,78526.26%7,27968.63%2,79926.48%7,30669.11%
    3 Streptococcus pneumoniae2,10619.86%9,38588.49%2,08719.74%9,39388.86%
    4 Klebsiella pneumoniae1,22111.51%10,6061,17811.14%10,571 100.00%
    2012-12-11B52010-10-15X2Hospital BB_STPHY_AURSSSSRFGram-positiveStaphylococcusaureusTRUE
    2012-01-10Y7Hospital DB_STRPT_PNMNRRRRFGram-positiveStreptococcuspneumoniaeTRUE
    2014-02-02K7Hospital AB_STPHY_AURSSSSRMGram-positiveStaphylococcusaureusTRUE
    2011-08-05V3Hospital BB_STRPT_PNMNSSSRFGram-positiveStreptococcuspneumoniaeTRUE
    2014-06-16Z8Hospital BB_STRPT_PNMNSSSRFGram-positiveStreptococcuspneumoniaeTRUE
    2017-08-23J10 Hospital D B_STRPT_PNMN R pneumoniae TRUE
    2011-06-11L7Hospital CB_STRPT_PNMNRRSRMGram-positiveStreptococcuspneumoniaeTRUE
    2012-12-19A10Hospital BB_STRPT_PNMNSSRRMGram-positiveStreptococcuspneumoniaeTRUE
    2014-12-05M6Hospital BB_ESCHR_COLIRSSRMGram-negativeEscherichiacoliTRUE
    2017-05-14L8Hospital CB_ESCHR_COLISSSRMGram-negativeEscherichiacoliTRUE
    2010-12-14Q1Hospital CB_STPHY_AURSSSSRFGram-positiveStaphylococcusaureusTRUE

    If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the bug_drug_combinations() function:

    @@ -875,50 +868,50 @@ Longest: 24

    E. coli AMX -2137 -139 -2218 -4494 +2196 +119 +2192 +4507 E. coli AMC -3298 -157 -1039 -4494 +3378 +151 +978 +4507 E. coli CIP -3230 +3282 0 -1264 -4494 +1225 +4507 E. coli GEN -3946 +3929 0 -548 -4494 +578 +4507 K. pneumoniae AMX 0 0 -1221 -1221 +1178 +1178 K. pneumoniae AMC -967 -44 -210 -1221 +930 +45 +203 +1178 @@ -941,34 +934,34 @@ Longest: 24

    E. coli GEN -3946 +3929 0 -548 -4494 +578 +4507 K. pneumoniae GEN -1088 +1052 0 -133 -1221 +126 +1178 S. aureus GEN -2490 +2473 0 -295 -2785 +326 +2799 S. pneumoniae GEN 0 0 -2106 -2106 +2087 +2087 @@ -982,7 +975,7 @@ Longest: 24

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

     data_1st %>% resistance(AMX)
    -# [1] 0.5427117
    +# [1] 0.5403462

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

     data_1st %>% 
    @@ -996,19 +989,19 @@ Longest: 24

    Hospital A -0.5356582 +0.5487147 Hospital B -0.5408108 +0.5436519 Hospital C -0.5371153 +0.5257549 Hospital D -0.5614714 +0.5338095 @@ -1027,23 +1020,23 @@ Longest: 24

    Hospital A -0.5356582 -3183 +0.5487147 +3151 Hospital B -0.5408108 -3700 +0.5436519 +3631 Hospital C -0.5371153 -1657 +0.5257549 +1689 Hospital D -0.5614714 -2066 +0.5338095 +2100 @@ -1064,27 +1057,27 @@ Longest: 24

    Escherichia -0.7688028 -0.8780596 -0.9815309 +0.7830042 +0.8717550 +0.9764810 Klebsiella -0.8280098 -0.8910729 -0.9754300 +0.8276740 +0.8930390 +0.9787776 Staphylococcus -0.7921005 -0.8940754 -0.9795332 +0.7874241 +0.8835298 +0.9828510 Streptococcus -0.5351377 +0.5318639 0.0000000 -0.5351377 +0.5318639 @@ -1109,23 +1102,23 @@ Longest: 24

    Hospital A -53.6% -26.4% +54.9% +25.8% Hospital B -54.1% -24.6% +54.4% +27.8% Hospital C -53.7% -27.5% +52.6% +25.0% Hospital D -56.1% -29.0% +53.4% +24.3% @@ -1209,16 +1202,16 @@ Longest: 24

    mic_values <- random_mic(size = 100) mic_values # Class <mic> -# [1] 0.25 16 0.0625 32 0.025 1 256 64 0.002 0.005 -# [11] 0.01 0.005 8 0.01 0.025 128 0.01 8 0.005 256 -# [21] 0.005 8 0.0625 0.125 0.005 16 8 2 0.5 4 -# [31] 2 32 0.25 0.25 8 0.025 0.25 8 64 1 -# [41] 0.005 0.01 0.005 256 0.025 0.5 2 0.025 0.5 0.005 -# [51] 0.0625 128 4 1 0.0625 0.002 16 0.002 8 0.005 -# [61] 1 1 8 32 0.002 32 0.25 8 4 0.001 -# [71] 2 16 16 0.025 0.005 0.0625 2 128 0.001 2 -# [81] 64 0.025 16 64 2 128 8 0.5 4 256 -# [91] 0.5 32 0.001 0.01 2 64 4 32 4 0.0625
    +# [1] 1 128 0.01 0.25 0.01 16 0.001 0.125 0.25 0.01 +# [11] 0.005 16 0.0625 64 >=256 0.5 0.01 16 0.5 0.0625 +# [21] 0.001 0.5 0.0625 4 2 8 0.5 0.0625 0.125 128 +# [31] 0.002 0.25 2 8 0.125 0.0625 0.125 16 128 0.002 +# [41] 1 0.005 2 32 0.01 0.0625 >=256 64 16 0.005 +# [51] 2 0.001 >=256 32 64 >=256 128 0.01 0.005 0.001 +# [61] 0.01 0.125 2 0.125 >=256 32 64 0.01 2 0.25 +# [71] 0.01 64 0.5 128 0.001 64 128 0.002 >=256 64 +# [81] 0.01 8 0.5 4 16 0.025 0.025 0.001 0.125 0.025 +# [91] 2 64 64 128 32 128 0.001 32 2 0.005
     # base R:
     plot(mic_values)
    @@ -1247,10 +1240,10 @@ Longest: 24

    # to review it. disk_values # Class <disk> -# [1] 26 25 28 21 24 22 21 27 22 21 31 25 26 17 28 29 18 31 21 30 23 28 22 18 28 -# [26] 21 25 26 18 30 22 28 25 28 25 21 29 26 19 21 19 26 31 17 25 22 21 27 24 26 -# [51] 20 17 18 27 31 31 20 31 26 22 25 22 19 22 27 19 25 27 30 17 24 27 22 28 18 -# [76] 26 30 29 25 23 26 29 19 25 25 24 25 30 29 25 29 17 26 21 20 29 26 23 29 31 +# [1] 30 29 25 23 27 18 23 21 31 26 17 30 18 31 30 25 22 19 18 26 31 19 21 25 29 +# [26] 22 26 30 20 20 18 19 18 29 22 17 27 21 24 18 17 23 27 18 19 31 18 29 30 25 +# [51] 27 23 21 20 31 19 19 25 25 23 23 19 17 25 21 30 20 31 26 23 29 27 30 29 24 +# [76] 20 23 23 27 20 24 19 28 24 31 29 26 23 20 29 23 18 17 27 21 28 28 17 23 17
     # base R:
     plot(disk_values, mo = "E. coli", ab = "cipro")
    diff --git a/docs/articles/AMR_files/figure-html/disk_plots-1.png b/docs/articles/AMR_files/figure-html/disk_plots-1.png index 26edd87f5..6e9e922b8 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots-1.png and b/docs/articles/AMR_files/figure-html/disk_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png index a591e0f04..93ccaf748 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-1.png b/docs/articles/AMR_files/figure-html/mic_plots-1.png index 4019d77dc..8470490fa 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-1.png and b/docs/articles/AMR_files/figure-html/mic_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-2.png b/docs/articles/AMR_files/figure-html/mic_plots-2.png index 242f6651f..aaeeb9365 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-2.png and b/docs/articles/AMR_files/figure-html/mic_plots-2.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png index 72086caae..4dd1cfffa 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png index 4e8112916..b2f017ad0 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png index 9f6e6e032..99d4f51e2 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png index d2495efba..3c77d6f02 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png index 632c43d7f..911414c05 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png index 472306e39..eec11e17b 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html index 620285f7e..0c32b4631 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/articles/MDR.html b/docs/articles/MDR.html index 5fd698b69..a59a1ebed 100644 --- a/docs/articles/MDR.html +++ b/docs/articles/MDR.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • @@ -364,19 +357,19 @@ Unique: 2

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

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

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

    1 Mono-resistant -3227 -64.54% -3227 -64.54% +3144 +62.88% +3144 +62.88% 2 Negative -990 -19.80% -4217 -84.34% +1027 +20.54% +4171 +83.42% 3 Multi-drug-resistant 464 9.28% -4681 -93.62% +4635 +92.70% 4 Poly-resistant -223 -4.46% -4904 -98.08% +257 +5.14% +4892 +97.84% 5 Extensively drug-resistant -96 -1.92% +108 +2.16% 5000 100.00% diff --git a/docs/articles/PCA.html b/docs/articles/PCA.html index 72a9a3a72..a8fcbf51b 100644 --- a/docs/articles/PCA.html +++ b/docs/articles/PCA.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/articles/SPSS.html b/docs/articles/SPSS.html index 47e5fe01d..aff0abd19 100644 --- a/docs/articles/SPSS.html +++ b/docs/articles/SPSS.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • @@ -198,7 +191,7 @@

    How to import data from SPSS / SAS / Stata

    Matthijs S. Berends

    -

    17 August 2021

    +

    29 August 2021

    Source: vignettes/SPSS.Rmd @@ -233,7 +226,7 @@
  • R has a huge community.

    -

    Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 414,789 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.

    +

    Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 415,751 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.

  • R understands any data type, including SPSS/SAS/Stata.

    diff --git a/docs/articles/WHONET.html b/docs/articles/WHONET.html index fcbbc3149..d3e2b66a7 100644 --- a/docs/articles/WHONET.html +++ b/docs/articles/WHONET.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code -
  • -
  • - - - - Survey -
  • diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index b88299999..6d8fa7967 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • @@ -231,32 +224,19 @@ times = 25) print(S.aureus, unit = "ms", signif = 2) # Unit: milliseconds -# expr min lq mean median uq max -# as.mo("sau") 12.0 13.0 14 13.0 13.0 45.0 -# as.mo("stau") 55.0 58.0 72 60.0 92.0 100.0 -# as.mo("STAU") 54.0 59.0 85 91.0 94.0 200.0 -# as.mo("staaur") 11.0 12.0 19 13.0 15.0 58.0 -# as.mo("STAAUR") 12.0 13.0 21 14.0 16.0 63.0 -# as.mo("S. aureus") 24.0 28.0 41 30.0 62.0 73.0 -# as.mo("S aureus") 26.0 28.0 37 30.0 33.0 75.0 -# as.mo("Staphylococcus aureus") 3.1 3.8 4 3.9 4.2 4.7 -# as.mo("Staphylococcus aureus (MRSA)") 250.0 260.0 270 260.0 290.0 300.0 -# as.mo("Sthafilokkockus aaureuz") 160.0 200.0 200 200.0 200.0 240.0 -# as.mo("MRSA") 11.0 13.0 20 13.0 15.0 55.0 -# as.mo("VISA") 21.0 22.0 31 23.0 27.0 69.0 -# neval -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 -# 25 +# expr min lq mean median uq max neval +# as.mo("sau") 12.0 13.0 15.0 14.0 15.0 48 25 +# as.mo("stau") 54.0 57.0 73.0 62.0 92.0 99 25 +# as.mo("STAU") 54.0 58.0 73.0 63.0 91.0 98 25 +# as.mo("staaur") 13.0 13.0 20.0 14.0 15.0 52 25 +# as.mo("STAAUR") 11.0 13.0 18.0 14.0 16.0 47 25 +# as.mo("S. aureus") 27.0 30.0 38.0 31.0 36.0 63 25 +# as.mo("S aureus") 27.0 29.0 42.0 33.0 60.0 66 25 +# as.mo("Staphylococcus aureus") 3.8 4.1 6.8 4.2 4.6 36 25 +# as.mo("Staphylococcus aureus (MRSA)") 240.0 250.0 280.0 270.0 300.0 320 25 +# as.mo("Sthafilokkockus aaureuz") 160.0 190.0 200.0 200.0 210.0 340 25 +# as.mo("MRSA") 13.0 13.0 17.0 14.0 15.0 46 25 +# as.mo("VISA") 20.0 23.0 34.0 25.0 52.0 59 25

    In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 200 times slower to determine.

    To improve performance, we implemented two important algorithms to save unnecessary calculations: repetitive results and already precalculated results.

    @@ -278,7 +258,7 @@ # what do these values look like? They are of class <mo>: head(x) # Class <mo> -# [1] B_STPHY_AURS B_STPHY_CONS B_ESCHR_COLI B_STRPT_PYGN B_STPHY_CONS +# [1] B_STRPT_PNMN B_KLBSL_PNMN B_ESCHR_COLI B_SERRT_MRCS B_STPHY_CONS # [6] B_ESCHR_COLI # as the example_isolates data set has 2,000 rows, we should have 2 million items @@ -295,7 +275,7 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# mo_name(x) 163 204 267 233 346 398 10 +# mo_name(x) 188 202 260 233 335 408 10

    So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.233 seconds. That is 116 nanoseconds on average. You only lose time on your unique input values.

    @@ -310,10 +290,10 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# A 7.93 8.08 14.50 8.35 8.46 70.00 10 -# B 22.40 22.80 24.30 24.30 24.60 27.20 10 -# C 1.89 2.00 2.19 2.15 2.30 2.76 10
    -

    So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0021 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

    +# A 8.09 8.18 8.94 8.69 9.47 10.50 10 +# B 23.40 24.90 31.90 27.90 28.20 80.70 10 +# C 2.03 2.20 2.35 2.35 2.48 2.66 10 +

    So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0023 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

     run_it <- microbenchmark(A = mo_species("aureus"),
                              B = mo_genus("Staphylococcus"),
    @@ -327,14 +307,14 @@
     print(run_it, unit = "ms", signif = 3)
     # Unit: milliseconds
     #  expr  min   lq mean median   uq  max neval
    -#     A 1.73 1.78 1.83   1.81 1.90 1.90    10
    -#     B 1.73 1.83 1.90   1.89 1.98 2.04    10
    -#     C 1.72 1.79 1.88   1.85 1.95 2.08    10
    -#     D 1.75 1.75 1.85   1.88 1.91 1.93    10
    -#     E 1.70 1.78 1.82   1.80 1.83 2.02    10
    -#     F 1.68 1.78 1.79   1.79 1.81 1.91    10
    -#     G 1.69 1.75 1.79   1.79 1.81 1.89    10
    -#     H 1.68 1.71 1.85   1.76 1.85 2.65    10
    +# A 1.68 1.72 1.88 1.88 1.97 2.32 10 +# B 1.64 1.80 1.90 1.95 1.98 2.14 10 +# C 1.71 1.74 1.88 1.80 2.08 2.21 10 +# D 1.70 1.79 1.86 1.87 1.96 1.99 10 +# E 1.73 1.85 1.94 1.91 2.03 2.20 10 +# F 1.71 1.78 1.91 1.89 2.00 2.25 10 +# G 1.66 1.78 1.87 1.88 1.98 2.04 10 +# H 1.73 1.82 2.06 1.98 2.07 2.80 10

    Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" anyway, there is no point in calculating the result. And because this package contains all phyla of all known bacteria, it can just return the initial value immediately.

    @@ -362,13 +342,13 @@ print(run_it, unit = "ms", signif = 4) # Unit: milliseconds # expr min lq mean median uq max neval -# en 19.47 20.23 24.54 20.72 21.85 89.57 100 -# de 30.58 31.52 41.31 32.78 34.76 86.03 100 -# nl 34.81 35.58 45.89 36.76 39.41 94.01 100 -# es 34.41 35.12 40.08 36.22 37.33 94.71 100 -# it 23.93 24.65 27.31 25.15 25.84 81.01 100 -# fr 23.59 24.40 31.40 25.01 25.62 200.30 100 -# pt 23.69 24.73 30.23 25.57 26.32 82.19 100
    +# en 19.64 20.10 28.32 20.72 22.65 104.80 100 +# de 30.76 31.59 37.06 32.27 33.87 95.10 100 +# nl 34.88 35.58 43.87 36.41 38.73 94.00 100 +# es 34.62 35.22 44.72 36.04 37.88 97.92 100 +# it 24.03 24.59 28.09 25.19 26.12 79.32 100 +# fr 23.79 24.37 30.37 24.89 26.29 194.10 100 +# pt 23.85 24.42 28.21 24.90 26.22 83.14 100

    Currently supported non-English languages are German, Dutch, Spanish, Italian, French and Portuguese.

    diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png index 2d6b4b660..cccc31b21 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index d6ef5fdd3..306ea9268 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9029 + 1.7.1.9030 @@ -190,7 +190,7 @@ @@ -222,13 +222,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index 0b9ce929d..9f4ad3b9d 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/articles/welcome_to_AMR.html b/docs/articles/welcome_to_AMR.html index 5c3f65681..030095db9 100644 --- a/docs/articles/welcome_to_AMR.html +++ b/docs/articles/welcome_to_AMR.html @@ -44,7 +44,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -174,13 +174,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/authors.html b/docs/authors.html index 871892e96..efbc0dd5e 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -92,7 +92,7 @@ AMR (for R) - 1.7.1.9025 + 1.7.1.9030 diff --git a/docs/extra.js b/docs/extra.js index 9d0b9d6c6..b5d968d58 100644 --- a/docs/extra.js +++ b/docs/extra.js @@ -98,6 +98,7 @@ $(document).ready(function() { x = x.replace(/Author, maintainer/g, "Main developer"); x = x.replace(/Author, contributor/g, "Main contributor"); x = x.replace(/Author, thesis advisor/g, "Doctoral advisor"); + x = x.replace("Matthijs", "Dr. Matthijs"); x = x.replace("Alex", "Prof. Dr. Alex"); x = x.replace("Bhanu", "Prof. Dr. Bhanu"); x = x.replace("Casper", "Prof. Dr. Casper"); diff --git a/docs/index.html b/docs/index.html index e6c741ea4..3c05d5d36 100644 --- a/docs/index.html +++ b/docs/index.html @@ -47,7 +47,7 @@ AMR (for R) - 1.7.1.9025 + 1.7.1.9030 @@ -194,10 +194,12 @@ +
    +

    This package formed the basis of two PhD theses, of which the first was published and defended on 25 August 2021. Click here to read it: DOI 10.33612/diss.177417131.

    +

    What is AMR (for R)?

    -

    (To find out how to conduct AMR data analysis, please continue reading here to get started.)

    AMR is a free, open-source and independent R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.

    After installing this package, R knows ~70,000 distinct microbial species and all ~550 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.

    This package is fully independent of any other R package and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen. This R package is actively maintained and is free software (see Copyright).

    diff --git a/docs/news/index.html b/docs/news/index.html index f0645f5c2..7df74c4ae 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -92,7 +92,7 @@ AMR (for R) - 1.7.1.9029 + 1.7.1.9030
    @@ -240,17 +240,17 @@ Source: NEWS.md -
    -

    - Unreleased AMR 1.7.1.9029

    -
    +
    +

    + Unreleased AMR 1.7.1.9030

    +

    -Last updated: 21 August 2021 +Last updated: 29 August 2021

    Breaking changes

    -
    • Removed p_symbol() and all filter_*() functions (except for filter_first_isolate()), which were all deprecated in a previous package version
    • +
      • Removed p_symbol() and all filter_*() functions (except for filter_first_isolate()), which were all deprecated in a previous package version
      • Removed the key_antibiotics() and key_antibiotics_equal() functions, which were deprecated and superseded by key_antimicrobials() and antimicrobials_equal()
      • Removed all previously implemented ggplot2::ggplot() generics for classes <mic>, <disk>, <rsi> and <resistance_predict> as they did not follow the ggplot2 logic. They were replaced with ggplot2::autoplot() generics.
      • @@ -266,13 +266,15 @@
        • The antibiotics data set now contains all ATC codes that are available through the WHOCC website, regardless of drugs being present in more than one ATC group. This means that:
          • Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)
          • -antibiotics$atc is now a list instead of a character, and this atc column was moved to the 5th position of the antibiotics data set
          • +antibiotics$atc is now a list containing character vectors, and this atc column was moved to the 5th position of the antibiotics data set
          • -ab_atc() does not always return a character vector with length 1, and returns a list if the input is larger than length 1
          • +ab_atc() does not always return a character vector of length 1, and returns a list if the input is larger than length 1 +
          • +ab_info() has a slightly different output
          • Some DDDs (daily defined doses) were added or updated according to newly included ATC codes
        • Antibiotic selectors -
          • They now also work in R-3.0 and R-3.1, supporting every version of R since 2013

          • + -
          • Fixed the Gram stain (mo_gramstain()) determination of the class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as Negativicoccus and Veillonella.
          • -
          • Fix for duplicate ATC codes in the antibiotics data set
          • +
          • Fixed the Gram stain (mo_gramstain()) determination of the taxonomic class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as Negativicoccus and Veillonella.
          • Fix to prevent introducing NAs for old MO codes when running as.mo() on them
          • Added more informative error messages when any of the proportion_*() and count_*() functions fail
          • When printing a tibble with any old MO code, a warning will be thrown that old codes should be updated using as.mo() @@ -608,7 +609,7 @@
          • For all function arguments in the code, it is now defined what the exact type of user input should be (inspired by the typed package). If the user input for a certain function does not meet the requirements for a specific argument (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 420 arguments were defined.

          • Fix for set_mo_source(), that previously would not remember the file location of the original file

          • -
          • Deprecated function p_symbol() that not really fits the scope of this package. It will be removed in a future version. See here for the source code to preserve it.

          • +
          • Deprecated function p_symbol() that not really fits the scope of this package. It will be removed in a future version. See here for the source code to preserve it.

          • Updated coagulase-negative staphylococci determination with Becker et al. 2020 (PMID 32056452), meaning that the species S. argensis, S. caeli, S. debuckii, S. edaphicus and S. pseudoxylosus are now all considered CoNS

          • Fix for using argument reference_df in as.mo() and mo_*() functions that contain old microbial codes (from previous package versions)

          • Fixed a bug where mo_uncertainties() would not return the results based on the MO matching score

          • @@ -841,7 +842,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

            Other

            -
            • Removed previously deprecated function p.symbol() - it was replaced with p_symbol() +
              • Removed previously deprecated function p.symbol() - it was replaced with p_symbol()
              • Removed function read.4d(), that was only useful for reading data from an old test database.
            @@ -1195,7 +1196,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
          • Improved filter_ab_class() to be more reliable and to support 5th generation cephalosporins
          • Function availability() now uses portion_R() instead of portion_IR(), to comply with EUCAST insights
          • Functions age() and age_groups() now have a na.rm argument to remove empty values
          • -
          • Renamed function p.symbol() to p_symbol() (the former is now deprecated and will be removed in a future version)
          • +
          • Renamed function p.symbol() to p_symbol() (the former is now deprecated and will be removed in a future version)
          • Using negative values for x in age_groups() will now introduce NAs and not return an error anymore
          • Fix for determining the system’s language
          • Fix for key_antibiotics() on foreign systems
          • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 0ac221678..b1eefcfc9 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2021-08-17T12:31Z +last_built: 2021-08-29T21:41Z urls: reference: https://msberends.github.io/AMR/reference article: https://msberends.github.io/AMR/articles diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index 550ae707e..19cbe3eaf 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9025 + 1.7.1.9030
    diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index f004e02ac..b0f67eaf3 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030
    @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index 79e51ba7d..3a1aca428 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030
    @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index d6f5aec4a..3724ee6bc 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030
    @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index 80e00b158..ce9ba0b9e 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030
    @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index 8329a5052..d65f933d9 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/age.html b/docs/reference/age.html index 336ac5b08..55abd61f1 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index f36c849ba..cd6c4bf69 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 22f7b1096..a308e213f 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9026 + 1.7.1.9030 diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index 226686b08..a0e0a1167 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9026 + 1.7.1.9030 diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 5ceae682a..7988f70c5 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index 0dc3f5bb9..214a23928 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index d940e8db7..7e2c86e49 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 90505700a..80749b6db 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index dfe7fea62..95c96f00a 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index 659868fed..2fda8144c 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9026 + 1.7.1.9030 diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 8d9d569e6..7eab338eb 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 1451ae21c..8c79e107b 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 826004829..9efb6a560 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 366bfc4ab..4102c6e65 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/count.html b/docs/reference/count.html index 6f5233860..2fe53ec26 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -94,7 +94,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ count_resistant() should be used to count resistant isolates, count_susceptible( Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/custom_eucast_rules.html b/docs/reference/custom_eucast_rules.html index ffdbd7490..0a36e7d57 100644 --- a/docs/reference/custom_eucast_rules.html +++ b/docs/reference/custom_eucast_rules.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/dosage.html b/docs/reference/dosage.html index 3ec07a362..fd846f2a5 100644 --- a/docs/reference/dosage.html +++ b/docs/reference/dosage.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 788e3b8f3..9f64b8152 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -94,7 +94,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index 7503bf418..c8c616aba 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/example_isolates_unclean.html b/docs/reference/example_isolates_unclean.html index 700cf290b..00436cbf8 100644 --- a/docs/reference/example_isolates_unclean.html +++ b/docs/reference/example_isolates_unclean.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 0e2c67d81..6968ef2b5 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -94,7 +94,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index ccc5c58ed..0a06dc641 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/get_episode.html b/docs/reference/get_episode.html index 079518c34..d706bdfa2 100644 --- a/docs/reference/get_episode.html +++ b/docs/reference/get_episode.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html index 3bc58f571..1e9c1ef73 100644 --- a/docs/reference/ggplot_pca.html +++ b/docs/reference/ggplot_pca.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 3471c68ef..8fd9362d6 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 837f2a050..5f54761f2 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/index.html b/docs/reference/index.html index e9ac0f4db..4c7874406 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -92,7 +92,7 @@ AMR (for R) - 1.7.1.9026 + 1.7.1.9030 diff --git a/docs/reference/intrinsic_resistant.html b/docs/reference/intrinsic_resistant.html index 4bc2ef7b2..55c999f7f 100644 --- a/docs/reference/intrinsic_resistant.html +++ b/docs/reference/intrinsic_resistant.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/italicise_taxonomy.html b/docs/reference/italicise_taxonomy.html index 90cc34ac7..71352820f 100644 --- a/docs/reference/italicise_taxonomy.html +++ b/docs/reference/italicise_taxonomy.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/join.html b/docs/reference/join.html index 6d2ccc148..5d9c95df6 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/key_antimicrobials.html b/docs/reference/key_antimicrobials.html index 6aba00068..f487e59f6 100644 --- a/docs/reference/key_antimicrobials.html +++ b/docs/reference/key_antimicrobials.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 494ae64cc..63a2a538d 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index f2d410769..adf962097 100644 --- a/docs/reference/lifecycle.html +++ b/docs/reference/lifecycle.html @@ -95,7 +95,7 @@ This page contains a section for every lifecycle (with text borrowed from the af AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -225,13 +225,6 @@ This page contains a section for every lifecycle (with text borrowed from the af Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/like.html b/docs/reference/like.html index f036061d3..b00349be9 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 813847d22..3a5610cb3 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 4d95c3b5d..5479dd3cc 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index fa12ceade..510070c94 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index d2e02e4ad..440b4eb8a 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index 8c447ad9b..d49640abe 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 81adeb030..2a0215010 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index d4d869edf..d7dc85dbf 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -94,7 +94,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ This is the fastest way to have your organisation (or analysis) specific codes p Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 5211838e3..79f709942 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/plot.html b/docs/reference/plot.html index 15a43bf25..76e5f7e2b 100644 --- a/docs/reference/plot.html +++ b/docs/reference/plot.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index b9f57bd72..c61c3f327 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -94,7 +94,7 @@ resistance() should be used to calculate resistance, susceptibility() should be AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ resistance() should be used to calculate resistance, susceptibility() should be Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/random.html b/docs/reference/random.html index 0d01c2b19..abc830ef6 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index f0862652d..dd4966367 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index 144426cff..ad7b3e824 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index b8b2aeeea..478e45eb0 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -94,7 +94,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -224,13 +224,6 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu Source Code - -
  • - - - - Survey -
  • diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 47f54ad1a..b827f5ded 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -93,7 +93,7 @@ AMR (for R) - 1.7.1.9024 + 1.7.1.9030 @@ -223,13 +223,6 @@ Source Code - -
  • - - - - Survey -
  • diff --git a/docs/survey.html b/docs/survey.html index 8949a79a4..50851392c 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -92,7 +92,7 @@ AMR (for R) - 1.7.1.9025 + 1.7.1.9030 diff --git a/index.md b/index.md index 425e7b33f..6e6b3d794 100644 --- a/index.md +++ b/index.md @@ -1,8 +1,9 @@ # `AMR` (for R) -### What is `AMR` (for R)? +> This package formed the basis of two PhD theses, of which the first was published and defended on 25 August 2021. +> Click here to read it: [DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131). -*(To find out how to conduct AMR data analysis, please [continue reading here to get started](./articles/AMR.html).)* +### What is `AMR` (for R)? `AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. diff --git a/inst/tinytest/test-first_isolate.R b/inst/tinytest/test-first_isolate.R index f6e48fcd2..e7ddc8572 100755 --- a/inst/tinytest/test-first_isolate.R +++ b/inst/tinytest/test-first_isolate.R @@ -133,7 +133,9 @@ if (AMR:::pkg_is_available("dplyr")) { first_isolate(info = TRUE)) # groups + message("get to first isolates L136") x <- example_isolates %>% group_by(ward_icu) %>% mutate(first = first_isolate()) + message("get to first isolates L138") y <- example_isolates %>% group_by(ward_icu) %>% mutate(first = first_isolate(.)) expect_identical(x, y) diff --git a/pkgdown/extra.js b/pkgdown/extra.js index 9d0b9d6c6..b5d968d58 100644 --- a/pkgdown/extra.js +++ b/pkgdown/extra.js @@ -98,6 +98,7 @@ $(document).ready(function() { x = x.replace(/Author, maintainer/g, "Main developer"); x = x.replace(/Author, contributor/g, "Main contributor"); x = x.replace(/Author, thesis advisor/g, "Doctoral advisor"); + x = x.replace("Matthijs", "Dr. Matthijs"); x = x.replace("Alex", "Prof. Dr. Alex"); x = x.replace("Bhanu", "Prof. Dr. Bhanu"); x = x.replace("Casper", "Prof. Dr. Casper");