From 3560dfd6119b5f0c3ea55fe75ea64a42b6e90f22 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:11:30 +0000 Subject: [PATCH] Built site for AMR@3.0.1.9036: 4171d5b --- 404.html | 2 +- CLAUDE.html | 15 ++- CLAUDE.md | 15 ++- LICENSE-text.html | 2 +- articles/AMR.html | 160 +++++++++++------------ articles/AMR.md | 108 ++++++++------- articles/AMR_for_Python.html | 2 +- articles/AMR_with_tidymodels.html | 62 +++++---- articles/AMR_with_tidymodels.md | 32 +++-- articles/EUCAST.html | 2 +- articles/PCA.html | 15 ++- articles/PCA.md | 11 +- articles/WHONET.html | 11 +- articles/WHONET.md | 7 +- articles/WISCA.html | 2 +- articles/datasets.html | 4 +- articles/index.html | 2 +- authors.html | 2 +- index.html | 2 +- news/index.html | 13 +- news/index.md | 6 +- pkgdown.yml | 2 +- reference/AMR-deprecated.html | 2 +- reference/AMR-options.html | 2 +- reference/AMR.html | 2 +- reference/WHOCC.html | 2 +- reference/WHONET.html | 2 +- reference/ab_from_text.html | 2 +- reference/ab_property.html | 2 +- reference/add_custom_antimicrobials.html | 9 +- reference/add_custom_antimicrobials.md | 3 +- reference/add_custom_microorganisms.html | 13 +- reference/add_custom_microorganisms.md | 3 +- reference/age.html | 22 ++-- reference/age.md | 20 +-- reference/age_groups.html | 2 +- reference/amr-tidymodels.html | 2 +- reference/amr_course.html | 12 +- reference/amr_course.md | 26 ++-- reference/antibiogram.html | 30 ++--- reference/antibiogram.md | 18 +-- reference/antimicrobial_selectors.html | 136 ++++++++++--------- reference/antimicrobial_selectors.md | 44 +++---- reference/antimicrobials.html | 2 +- reference/as.ab.html | 2 +- reference/as.av.html | 2 +- reference/as.disk.html | 2 +- reference/as.mic.html | 2 +- reference/as.mo.html | 6 +- reference/as.sir.html | 78 +++++------ reference/as.sir.md | 68 +++++----- reference/atc_online.html | 16 ++- reference/atc_online.md | 14 +- reference/av_from_text.html | 2 +- reference/av_property.html | 2 +- reference/availability.html | 11 +- reference/availability.md | 7 +- reference/bug_drug_combinations.html | 8 +- reference/clinical_breakpoints.html | 2 +- reference/count.html | 33 ++--- reference/count.md | 25 ++-- reference/custom_eucast_rules.html | 8 +- reference/custom_eucast_rules.md | 6 +- reference/custom_mdro_guideline.html | 22 ++-- reference/custom_mdro_guideline.md | 16 +-- reference/dosage.html | 2 +- reference/esbl_isolates.html | 2 +- reference/example_isolates.html | 2 +- reference/example_isolates_unclean.html | 2 +- reference/export_ncbi_biosample.html | 2 +- reference/first_isolate.html | 63 ++++----- reference/first_isolate.md | 29 ++-- reference/g.test.html | 2 +- reference/get_episode.html | 2 +- reference/ggplot_pca.html | 6 +- reference/ggplot_pca.md | 4 +- reference/ggplot_sir.html | 5 +- reference/ggplot_sir.md | 1 + reference/guess_ab_col.html | 14 +- reference/guess_ab_col.md | 2 +- reference/index.html | 2 +- reference/interpretive_rules.html | 24 ++-- reference/interpretive_rules.md | 18 ++- reference/intrinsic_resistant.html | 2 +- reference/italicise_taxonomy.html | 2 +- reference/join.html | 4 +- reference/key_antimicrobials.html | 2 +- reference/kurtosis.html | 2 +- reference/like.html | 6 +- reference/like.md | 4 +- reference/mdro.html | 12 +- reference/mdro.md | 10 +- reference/mean_amr_distance.html | 20 +-- reference/mean_amr_distance.md | 12 +- reference/microorganisms.codes.html | 2 +- reference/microorganisms.groups.html | 2 +- reference/microorganisms.html | 2 +- reference/mo_matching_score.html | 34 ++--- reference/mo_matching_score.md | 24 ++-- reference/mo_property.html | 20 +-- reference/mo_property.md | 14 +- reference/mo_source.html | 2 +- reference/pca.html | 6 +- reference/pca.md | 4 +- reference/plot.html | 2 +- reference/proportion.html | 12 +- reference/proportion.md | 8 +- reference/random.html | 2 +- reference/resistance_predict.html | 10 +- reference/resistance_predict.md | 8 +- reference/skewness.html | 2 +- reference/top_n_microorganisms.html | 2 +- reference/translate.html | 15 +-- reference/translate.md | 3 +- search.json | 2 +- 115 files changed, 820 insertions(+), 779 deletions(-) diff --git a/404.html b/404.html index 91d7b0d21..d8e883b44 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/CLAUDE.html b/CLAUDE.html index 4a55d70cd..581b5b5c4 100644 --- a/CLAUDE.html +++ b/CLAUDE.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -73,7 +73,7 @@ pkgdown::build_site() # Code coverage report -covr::package_coverage() +covr::package_coverage() From the shell: # CRAN check from parent directory R CMD check AMR @@ -229,11 +229,14 @@ _pkgdown.yml # pkgdown website configuration currentversion="${currenttag}.$((currentcommit + 9001 + 1))" echo "$currentversion" The + 1 accounts for the fact that this PR’s squash commit is not yet on the default branch. Set both of these files to the resulting version string (and only once per PR, even across multiple commits): - -DESCRIPTION — the Version: field +DESCRIPTION — the Version: field -NEWS.md — the top-level heading # AMR <version> - +NEWS.md — only replace line 1 (the # AMR <version> heading) with the new version number; do not create a new section. NEWS.md is a continuous log for the entire current x.y.z.9nnn development series: all changes since the last stable release accumulate under that single heading. After updating line 1, append the new change as a bullet under the appropriate sub-heading (### New, ### Fixes, or ### Updates). +Style rules for NEWS.md entries: +Be extremely concise — one short line per item +Do not end with a full stop (period) +No verbose explanations; just the essential fact + If git describe fails (e.g. no tags exist in the environment), fall back to reading the current version from DESCRIPTION and adding 1 to the last numeric component — but only if no bump has already been made in this PR. diff --git a/CLAUDE.md b/CLAUDE.md index 14e394eba..76ccbce25 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -188,7 +188,20 @@ on the default branch. Set **both** of these files to the resulting version string (and only once per PR, even across multiple commits): 1. **`DESCRIPTION`** — the `Version:` field -2. **`NEWS.md`** — the top-level heading `# AMR ` + +2. **`NEWS.md`** — **only replace line 1** (the `# AMR ` + heading) with the new version number; do **not** create a new + section. `NEWS.md` is a **continuous log** for the entire current + `x.y.z.9nnn` development series: all changes since the last stable + release accumulate under that single heading. After updating line 1, + append the new change as a bullet under the appropriate sub-heading + (`### New`, `### Fixes`, or `### Updates`). + + Style rules for `NEWS.md` entries: + + - Be **extremely concise** — one short line per item + - Do **not** end with a full stop (period) + - No verbose explanations; just the essential fact If `git describe` fails (e.g. no tags exist in the environment), fall back to reading the current version from `DESCRIPTION` and adding 1 to diff --git a/LICENSE-text.html b/LICENSE-text.html index a01faa977..fdae8f208 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/articles/AMR.html b/articles/AMR.html index a8ac49ba4..2a2f15b00 100644 --- a/articles/AMR.html +++ b/articles/AMR.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -91,7 +91,7 @@ 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 18 March 2026. +generated on 20 March 2026. Introduction @@ -147,21 +147,21 @@ make the structure of your data generally look like this: -2026-03-18 +2026-03-20 abcd Escherichia coli S S -2026-03-18 +2026-03-20 abcd Escherichia coli S R -2026-03-18 +2026-03-20 efgh Escherichia coli R @@ -263,56 +263,54 @@ user input can be used: Now we can thus clean our data: our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE) -#> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL", -#> "KLEPNE", "STAAUR", and "STRPNE". -#> ℹ Microorganism translation was uncertain for four microorganisms. Run -#> `mo_uncertainties()` to review these uncertainties, or use -#> `add_custom_microorganisms()` to add custom entries. +#> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL", +#> "KLEPNE", "STAAUR", and "STRPNE". +#> ℹ Microorganism translation was uncertain for four microorganisms. Run +#> `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to review these +#> uncertainties, or use `add_custom_microorganisms()` +#> (`?AMR::add_custom_microorganisms()`) to add custom entries. Apparently, there was some uncertainty about the translation to taxonomic codes. Let’s check this: mo_uncertainties() -#> Matching scores are based on the resemblance between the input and the full -#> taxonomic name, and the pathogenicity in humans. See `?mo_matching_score`. -#> Colour keys: 0.000-0.549 0.550-0.649 0.650-0.749 0.750-1.000 -#> -#> -------------------------------------------------------------------------------- -#> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688) -#> Also matched: Enterococcus crotali (0.650), Escherichia coli coli -#> (0.643), Escherichia coli expressing (0.611), Enterobacter cowanii -#> (0.600), Enterococcus columbae (0.595), Enterococcus camelliae (0.591), -#> Enterococcus casseliflavus (0.577), Enterobacter cloacae cloacae -#> (0.571), Enterobacter cloacae complex (0.571), and Enterobacter cloacae -#> dissolvens (0.565) -#> -------------------------------------------------------------------------------- -#> "K. pneumoniae" -> Klebsiella pneumoniae (B_KLBSL_PNMN, 0.786) -#> Also matched: Klebsiella pneumoniae complex (0.707), Klebsiella -#> pneumoniae ozaenae (0.707), Klebsiella pneumoniae pneumoniae (0.688), -#> Klebsiella pneumoniae rhinoscleromatis (0.658), Klebsiella pasteurii -#> (0.500), Klebsiella planticola (0.500), Kingella potus (0.400), -#> Kluyveromyces pseudotropicale (0.386), Kluyveromyces pseudotropicalis -#> (0.363), and Kosakonia pseudosacchari (0.361) -#> -------------------------------------------------------------------------------- -#> "S. aureus" -> Staphylococcus aureus (B_STPHY_AURS, 0.690) -#> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus -#> argenteus (0.625), Staphylococcus aureus anaerobius (0.625), -#> Staphylococcus auricularis (0.615), Salmonella Aurelianis (0.595), -#> Salmonella Aarhus (0.588), Salmonella Amounderness (0.587), -#> Staphylococcus argensis (0.587), Streptococcus australis (0.587), and -#> Salmonella choleraesuis arizonae (0.562) -#> -------------------------------------------------------------------------------- -#> "S. pneumoniae" -> Streptococcus pneumoniae (B_STRPT_PNMN, 0.750) -#> Also matched: Streptococcus pseudopneumoniae (0.700), Streptococcus -#> phocae salmonis (0.552), Serratia proteamaculans quinovora (0.545), -#> Streptococcus pseudoporcinus (0.536), Staphylococcus piscifermentans -#> (0.533), Staphylococcus pseudintermedius (0.532), Serratia -#> proteamaculans proteamaculans (0.526), Streptococcus gallolyticus -#> pasteurianus (0.526), Salmonella Portanigra (0.524), and Streptococcus -#> periodonticum (0.519) -#> -#> Only the first 10 other matches of each record are shown. Run -#> `print(mo_uncertainties(), n = ...)` to view more entries, or save -#> `mo_uncertainties()` to an object. +#> Matching scores are based on the resemblance between the input and the full +#> taxonomic name, and the pathogenicity in humans. See `mo_matching_score()` +#> (`?AMR::mo_matching_score()`). +#> Colour keys: 0.000-0.549 0.550-0.649 0.650-0.749 0.750-1.000 +#> ------------------------------------------------------------------------------- +#> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688) +#> Also matched: Enterococcus crotali (0.650), Escherichia coli coli (0.643), +#> Escherichia coli expressing (0.611), Enterobacter cowanii (0.600), Enterococcus +#> columbae (0.595), Enterococcus camelliae (0.591), Enterococcus casseliflavus +#> (0.577), Enterobacter cloacae cloacae (0.571), Enterobacter cloacae complex +#> (0.571), and Enterobacter cloacae dissolvens (0.565) +#> ------------------------------------------------------------------------------- +#> "K. pneumoniae" -> Klebsiella pneumoniae (B_KLBSL_PNMN, 0.786) +#> Also matched: Klebsiella pneumoniae complex (0.707), Klebsiella pneumoniae +#> ozaenae (0.707), Klebsiella pneumoniae pneumoniae (0.688), Klebsiella +#> pneumoniae rhinoscleromatis (0.658), Klebsiella pasteurii (0.500), Klebsiella +#> planticola (0.500), Kingella potus (0.400), Kluyveromyces pseudotropicale +#> (0.386), Kluyveromyces pseudotropicalis (0.363), and Kosakonia pseudosacchari +#> (0.361) +#> ------------------------------------------------------------------------------- +#> "S. aureus" -> Staphylococcus aureus (B_STPHY_AURS, 0.690) +#> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus argenteus +#> (0.625), Staphylococcus aureus anaerobius (0.625), Staphylococcus auricularis +#> (0.615), Salmonella Aurelianis (0.595), Salmonella Aarhus (0.588), Salmonella +#> Amounderness (0.587), Staphylococcus argensis (0.587), Streptococcus australis +#> (0.587), and Salmonella choleraesuis arizonae (0.562) +#> ------------------------------------------------------------------------------- +#> "S. pneumoniae" -> Streptococcus pneumoniae (B_STRPT_PNMN, 0.750) +#> Also matched: Streptococcus pseudopneumoniae (0.700), Streptococcus phocae +#> salmonis (0.552), Serratia proteamaculans quinovora (0.545), Streptococcus +#> pseudoporcinus (0.536), Staphylococcus piscifermentans (0.533), Staphylococcus +#> pseudintermedius (0.532), Serratia proteamaculans proteamaculans (0.526), +#> Streptococcus gallolyticus pasteurianus (0.526), Salmonella Portanigra (0.524), +#> and Streptococcus periodonticum (0.519) +#> ℹ Only the first 10 other matches of each record are shown. Run +#> `print(mo_uncertainties(), n = ...)` (`?AMR::mo_uncertainties()`) to view +#> more entries, or save `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to an +#> object. That’s all good. @@ -399,16 +397,15 @@ the methods on the first_isolate our_data <- our_data %>% mutate(first = first_isolate(info = TRUE)) -#> ℹ Determining first isolates using an episode length of 365 days -#> ℹ Using column 'bacteria' as input for `col_mo`. -#> ℹ Column 'first' is SIR eligible (despite only having empty values), since -#> it seems to be cefozopran (ZOP) -#> ℹ Using column 'date' as input for `col_date`. -#> ℹ Using column 'patient_id' as input for `col_patient_id`. -#> ℹ Basing inclusion on all antimicrobial results, using a points threshold -#> of 2 -#> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a -#> microbial ID was available) +#> ℹ Determining first isolates using an episode length of 365 days +#> ℹ Using column 'bacteria' as input for `col_mo`. +#> ℹ Column 'first' is SIR eligible (despite only having empty values), since it +#> seems to be cefozopran (ZOP) +#> ℹ Using column 'date' as input for `col_date`. +#> ℹ Using column 'patient_id' as input for `col_patient_id`. +#> ℹ Basing inclusion on all antimicrobial results, using a points threshold of 2 +#> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a +#> microbial ID was available) So only 91% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package: @@ -525,7 +522,7 @@ in: our_data_1st %>% select(date, aminoglycosides()) -#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) +#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) #> # A tibble: 2,724 × 2 #> date GEN #> <date> <sir> @@ -543,8 +540,8 @@ in: our_data_1st %>% select(bacteria, betalactams()) -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 2,724 × 3 #> bacteria AMX AMC #> <mo> <sir> <sir> @@ -580,7 +577,7 @@ in: # filtering using AB selectors is also possible: our_data_1st %>% filter(any(aminoglycosides() == "R")) -#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) +#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) #> # A tibble: 981 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -598,8 +595,8 @@ in: our_data_1st %>% filter(all(betalactams() == "R")) -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 462 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -617,8 +614,8 @@ in: # even works in base R (since R 3.0): our_data_1st[all(betalactams() == "R"), ] -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 462 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -699,9 +696,9 @@ previously mentioned antibiotic class selectors: antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems())) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) @@ -830,8 +827,8 @@ language to be Spanish using the language argument: antibiotics = aminoglycosides(), ab_transform = "name", language = "es") -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) @@ -956,9 +953,9 @@ argument must be used. This can be any column in the data, or e.g. an antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems()), syndromic_group = "ward") -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) @@ -1285,10 +1282,11 @@ I (proportion_SI(), equa own: our_data_1st %>% resistance(AMX) -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). +#> ℹ This message will be shown once per session. #> [1] 0.4203377 Or can be used in conjunction with group_by() and summarise(), both from the dplyr package: diff --git a/articles/AMR.md b/articles/AMR.md index 529fee0ff..349828333 100644 --- a/articles/AMR.md +++ b/articles/AMR.md @@ -3,7 +3,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](https://rmarkdown.rstudio.com/). However, the -methodology remains unchanged. This page was generated on 18 March 2026. +methodology remains unchanged. This page was generated on 20 March 2026. ## Introduction @@ -51,9 +51,9 @@ structure of your data generally look like this: | date | patient_id | mo | AMX | CIP | |:----------:|:----------:|:----------------:|:---:|:---:| -| 2026-03-18 | abcd | Escherichia coli | S | S | -| 2026-03-18 | abcd | Escherichia coli | S | R | -| 2026-03-18 | efgh | Escherichia coli | R | S | +| 2026-03-20 | abcd | Escherichia coli | S | S | +| 2026-03-20 | abcd | Escherichia coli | S | R | +| 2026-03-20 | efgh | Escherichia coli | R | S | ### Needed R packages @@ -169,8 +169,9 @@ our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE) #> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL", #> "KLEPNE", "STAAUR", and "STRPNE". #> ℹ Microorganism translation was uncertain for four microorganisms. Run -#> `mo_uncertainties()` to review these uncertainties, or use -#> `add_custom_microorganisms()` to add custom entries. +#> `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to review these +#> uncertainties, or use `add_custom_microorganisms()` +#> (`?AMR::add_custom_microorganisms()`) to add custom entries. ``` Apparently, there was some uncertainty about the translation to @@ -179,46 +180,43 @@ taxonomic codes. Let’s check this: ``` r mo_uncertainties() #> Matching scores are based on the resemblance between the input and the full -#> taxonomic name, and the pathogenicity in humans. See `?mo_matching_score`. +#> taxonomic name, and the pathogenicity in humans. See `mo_matching_score()` +#> (`?AMR::mo_matching_score()`). #> Colour keys: 0.000-0.549 0.550-0.649 0.650-0.749 0.750-1.000 -#> -#> -------------------------------------------------------------------------------- +#> ------------------------------------------------------------------------------- #> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688) -#> Also matched: Enterococcus crotali (0.650), Escherichia coli coli -#> (0.643), Escherichia coli expressing (0.611), Enterobacter cowanii -#> (0.600), Enterococcus columbae (0.595), Enterococcus camelliae (0.591), -#> Enterococcus casseliflavus (0.577), Enterobacter cloacae cloacae -#> (0.571), Enterobacter cloacae complex (0.571), and Enterobacter cloacae -#> dissolvens (0.565) -#> -------------------------------------------------------------------------------- +#> Also matched: Enterococcus crotali (0.650), Escherichia coli coli (0.643), +#> Escherichia coli expressing (0.611), Enterobacter cowanii (0.600), Enterococcus +#> columbae (0.595), Enterococcus camelliae (0.591), Enterococcus casseliflavus +#> (0.577), Enterobacter cloacae cloacae (0.571), Enterobacter cloacae complex +#> (0.571), and Enterobacter cloacae dissolvens (0.565) +#> ------------------------------------------------------------------------------- #> "K. pneumoniae" -> Klebsiella pneumoniae (B_KLBSL_PNMN, 0.786) -#> Also matched: Klebsiella pneumoniae complex (0.707), Klebsiella -#> pneumoniae ozaenae (0.707), Klebsiella pneumoniae pneumoniae (0.688), -#> Klebsiella pneumoniae rhinoscleromatis (0.658), Klebsiella pasteurii -#> (0.500), Klebsiella planticola (0.500), Kingella potus (0.400), -#> Kluyveromyces pseudotropicale (0.386), Kluyveromyces pseudotropicalis -#> (0.363), and Kosakonia pseudosacchari (0.361) -#> -------------------------------------------------------------------------------- +#> Also matched: Klebsiella pneumoniae complex (0.707), Klebsiella pneumoniae +#> ozaenae (0.707), Klebsiella pneumoniae pneumoniae (0.688), Klebsiella +#> pneumoniae rhinoscleromatis (0.658), Klebsiella pasteurii (0.500), Klebsiella +#> planticola (0.500), Kingella potus (0.400), Kluyveromyces pseudotropicale +#> (0.386), Kluyveromyces pseudotropicalis (0.363), and Kosakonia pseudosacchari +#> (0.361) +#> ------------------------------------------------------------------------------- #> "S. aureus" -> Staphylococcus aureus (B_STPHY_AURS, 0.690) -#> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus -#> argenteus (0.625), Staphylococcus aureus anaerobius (0.625), -#> Staphylococcus auricularis (0.615), Salmonella Aurelianis (0.595), -#> Salmonella Aarhus (0.588), Salmonella Amounderness (0.587), -#> Staphylococcus argensis (0.587), Streptococcus australis (0.587), and -#> Salmonella choleraesuis arizonae (0.562) -#> -------------------------------------------------------------------------------- +#> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus argenteus +#> (0.625), Staphylococcus aureus anaerobius (0.625), Staphylococcus auricularis +#> (0.615), Salmonella Aurelianis (0.595), Salmonella Aarhus (0.588), Salmonella +#> Amounderness (0.587), Staphylococcus argensis (0.587), Streptococcus australis +#> (0.587), and Salmonella choleraesuis arizonae (0.562) +#> ------------------------------------------------------------------------------- #> "S. pneumoniae" -> Streptococcus pneumoniae (B_STRPT_PNMN, 0.750) -#> Also matched: Streptococcus pseudopneumoniae (0.700), Streptococcus -#> phocae salmonis (0.552), Serratia proteamaculans quinovora (0.545), -#> Streptococcus pseudoporcinus (0.536), Staphylococcus piscifermentans -#> (0.533), Staphylococcus pseudintermedius (0.532), Serratia -#> proteamaculans proteamaculans (0.526), Streptococcus gallolyticus -#> pasteurianus (0.526), Salmonella Portanigra (0.524), and Streptococcus -#> periodonticum (0.519) -#> -#> Only the first 10 other matches of each record are shown. Run -#> `print(mo_uncertainties(), n = ...)` to view more entries, or save -#> `mo_uncertainties()` to an object. +#> Also matched: Streptococcus pseudopneumoniae (0.700), Streptococcus phocae +#> salmonis (0.552), Serratia proteamaculans quinovora (0.545), Streptococcus +#> pseudoporcinus (0.536), Staphylococcus piscifermentans (0.533), Staphylococcus +#> pseudintermedius (0.532), Serratia proteamaculans proteamaculans (0.526), +#> Streptococcus gallolyticus pasteurianus (0.526), Salmonella Portanigra (0.524), +#> and Streptococcus periodonticum (0.519) +#> ℹ Only the first 10 other matches of each record are shown. Run +#> `print(mo_uncertainties(), n = ...)` (`?AMR::mo_uncertainties()`) to view +#> more entries, or save `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to an +#> object. ``` That’s all good. @@ -317,14 +315,13 @@ our_data <- our_data %>% mutate(first = first_isolate(info = TRUE)) #> ℹ Determining first isolates using an episode length of 365 days #> ℹ Using column 'bacteria' as input for `col_mo`. -#> ℹ Column 'first' is SIR eligible (despite only having empty values), since -#> it seems to be cefozopran (ZOP) +#> ℹ Column 'first' is SIR eligible (despite only having empty values), since it +#> seems to be cefozopran (ZOP) #> ℹ Using column 'date' as input for `col_date`. #> ℹ Using column 'patient_id' as input for `col_patient_id`. -#> ℹ Basing inclusion on all antimicrobial results, using a points threshold -#> of 2 +#> ℹ Basing inclusion on all antimicrobial results, using a points threshold of 2 #> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a -#> microbial ID was available) +#> microbial ID was available) ``` So only 91% is suitable for resistance analysis! We can now filter on it @@ -628,8 +625,8 @@ antibiotic class selectors: ``` r antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems())) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) ``` @@ -667,8 +664,8 @@ antibiogram(example_isolates, antibiotics = aminoglycosides(), ab_transform = "name", language = "es") -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) ``` | Patógeno | Amikacina | Gentamicina | Kanamicina | Tobramicina | @@ -711,8 +708,8 @@ on certain columns: antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems()), syndromic_group = "ward") -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) ``` @@ -844,9 +841,10 @@ These functions can be used on their own: ``` r our_data_1st %>% resistance(AMX) -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. #> [1] 0.4203377 ``` diff --git a/articles/AMR_for_Python.html b/articles/AMR_for_Python.html index 5b0a32e89..d15fc894a 100644 --- a/articles/AMR_for_Python.html +++ b/articles/AMR_for_Python.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/articles/AMR_with_tidymodels.html b/articles/AMR_with_tidymodels.html index 8a7d4ef4a..c64dd7cbf 100644 --- a/articles/AMR_with_tidymodels.html +++ b/articles/AMR_with_tidymodels.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -179,14 +179,14 @@ package. mo = as.factor(mo_gramstain(mo))) %>% # drop NAs - the ones without a Gramstain (fungi, etc.) drop_na() -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' -#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' -#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' -#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' -#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), -#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' +#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' +#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' +#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' +#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), +#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) Explanation: @@ -227,26 +227,37 @@ we have with step_corr(), the necessary parameters can be estimated from a training set using prep(): prep(resistance_recipe) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' -#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' -#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' -#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' -#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), -#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' +#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' +#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' +#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' +#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), +#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) +#> #> #> ── Recipe ────────────────────────────────────────────────────────────────────── #> -#> ── Inputs +#> +#> +#> ── Inputs +#> #> Number of variables by role +#> #> outcome: 1 #> predictor: 20 #> -#> ── Training information +#> +#> +#> ── Training information +#> #> Training data contained 1968 data points and no incomplete rows. #> -#> ── Operations +#> +#> +#> ── Operations +#> #> • Correlation filter on: AMX CTX | Trained Explanation: @@ -737,11 +748,12 @@ into a structured time-series format. .names = "res_{.col}"), .groups = "drop") %>% filter(!is.na(res_AMX) & !is.na(res_AMC) & !is.na(res_CIP)) # Drop missing values -#> ℹ Using column 'mo' as input for `col_mo`. -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session. +#> ℹ Using column 'mo' as input for `col_mo`. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). +#> ℹ This message will be shown once per session. data_time #> # A tibble: 32 × 5 diff --git a/articles/AMR_with_tidymodels.md b/articles/AMR_with_tidymodels.md index f5ef179bb..528c273b0 100644 --- a/articles/AMR_with_tidymodels.md +++ b/articles/AMR_with_tidymodels.md @@ -94,8 +94,8 @@ data <- example_isolates %>% mo = as.factor(mo_gramstain(mo))) %>% # drop NAs - the ones without a Gramstain (fungi, etc.) drop_na() -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' #> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' #> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' @@ -144,8 +144,8 @@ a training set using `prep()`: ``` r prep(resistance_recipe) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) #> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' #> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' #> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' @@ -153,17 +153,28 @@ prep(resistance_recipe) #> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), #> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) #> +#> #> ── Recipe ────────────────────────────────────────────────────────────────────── #> -#> ── Inputs +#> +#> +#> ── Inputs +#> #> Number of variables by role +#> #> outcome: 1 #> predictor: 20 #> -#> ── Training information +#> +#> +#> ── Training information +#> #> Training data contained 1968 data points and no incomplete rows. #> -#> ── Operations +#> +#> +#> ── Operations +#> #> • Correlation filter on: AMX CTX | Trained ``` @@ -636,9 +647,10 @@ data_time <- example_isolates %>% .groups = "drop") %>% filter(!is.na(res_AMX) & !is.na(res_AMC) & !is.na(res_CIP)) # Drop missing values #> ℹ Using column 'mo' as input for `col_mo`. -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. data_time diff --git a/articles/EUCAST.html b/articles/EUCAST.html index 11384c54b..4ff52c71b 100644 --- a/articles/EUCAST.html +++ b/articles/EUCAST.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/articles/PCA.html b/articles/PCA.html index 38911d5cf..62540b548 100644 --- a/articles/PCA.html +++ b/articles/PCA.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -163,10 +163,11 @@ per taxonomic order and genus: order, genus, AMC, CXM, CTX, CAZ, GEN, TOB, TMP, SXT ) # and select only relevant columns -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). +#> ℹ This message will be shown once per session. head(resistance_data) #> # A tibble: 6 × 10 @@ -188,8 +189,8 @@ that contain numeric values in all selected variables, so we now only need to do: pca_result <- pca(resistance_data) -#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", -#> "TMP", and "TOB". Total observations available: 7. +#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", "TMP", +#> and "TOB". Total observations available: 7. The result can be reviewed with the good old summary() function: diff --git a/articles/PCA.md b/articles/PCA.md index 9e63716e5..b90f250cd 100644 --- a/articles/PCA.md +++ b/articles/PCA.md @@ -78,9 +78,10 @@ resistance_data <- example_isolates %>% order, genus, AMC, CXM, CTX, CAZ, GEN, TOB, TMP, SXT ) # and select only relevant columns -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. head(resistance_data) @@ -104,8 +105,8 @@ variables, so we now only need to do: ``` r pca_result <- pca(resistance_data) -#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", -#> "TMP", and "TOB". Total observations available: 7. +#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", "TMP", +#> and "TOB". Total observations available: 7. ``` The result can be reviewed with the good old diff --git a/articles/WHONET.html b/articles/WHONET.html index a46de966e..5d50dbcbc 100644 --- a/articles/WHONET.html +++ b/articles/WHONET.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -255,10 +255,11 @@ Longest: 40 # our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) -#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the -#> 'I' category susceptible. Set the `guideline` argument or the -#> `AMR_guideline` option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session. +#> ℹ `susceptibility()` (`?AMR::susceptibility()`) assumes the EUCAST guideline +#> and thus considers the 'I' category susceptible. Set the `guideline` argument +#> or the `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). +#> ℹ This message will be shown once per session. Frequency table Class: factor > ordered > sir (numeric) Length: 500 diff --git a/articles/WHONET.md b/articles/WHONET.md index 21b8030f4..a69d9c2a2 100644 --- a/articles/WHONET.md +++ b/articles/WHONET.md @@ -101,9 +101,10 @@ Longest: 40 # our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) -#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the -#> 'I' category susceptible. Set the `guideline` argument or the -#> `AMR_guideline` option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `susceptibility()` (`?AMR::susceptibility()`) assumes the EUCAST guideline +#> and thus considers the 'I' category susceptible. Set the `guideline` argument +#> or the `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. ``` diff --git a/articles/WISCA.html b/articles/WISCA.html index 2f3b644f2..8807ee537 100644 --- a/articles/WISCA.html +++ b/articles/WISCA.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/articles/datasets.html b/articles/datasets.html index f9d0d7176..f50b18908 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -80,7 +80,7 @@ Download data sets for download / own use - 18 March 2026 + 20 March 2026 Source: vignettes/datasets.Rmd datasets.Rmd diff --git a/articles/index.html b/articles/index.html index 06f338473..cbbec94db 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/authors.html b/authors.html index 8f7eeef84..23bceff64 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/index.html b/index.html index fbcf8e201..6e4de1802 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/news/index.html b/news/index.html index 985b59a45..fbddfb01e 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -49,9 +49,9 @@ -AMR 3.0.1.9035 +AMR 3.0.1.9036 -New +New Integration with the tidymodels framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via recipes step_mic_log2() to transform <mic> columns with log2, and step_sir_numeric() to convert <sir> columns to numeric @@ -83,7 +83,7 @@ Function amr_course(), which allows for automated download and unpacking of a GitHub repository for e.g. webinar use -Fixes +Fixes Fixed a bug in as.sir() where values that were purely numeric (e.g., "1") and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter Fixed a bug in as.mic() where MIC values in scientific notation (e.g., "1e-3") were incorrectly handled because the letter e was removed along with other Unicode letters; scientific notation e is now preserved Fixed a bug in as.ab() where certain AB codes containing “PH” or “TH” (such as ETH, MTH, PHE, PHN, STH, THA, THI1) would incorrectly return NA when combined in a vector with any untranslatable value (#245) @@ -96,8 +96,9 @@ Fixed SIR and MIC coercion of combined values, e.g. as.sir("<= 0.002; S") or as.mic("S; 0.002") (#252) -Updates - +Updates +Extensive cli integration for better message handling and clickable links in messages and warnings (#191, #265) + mdro() now infers resistance for a missing base drug column from an available corresponding drug+inhibitor combination showing resistance (e.g., piperacillin is absent but required, while piperacillin/tazobactam available and resistant). Can be set with the new argument infer_from_combinations, which defaults to TRUE (#209). Note that this can yield a higher MDRO detection (which is a good thing as it has become more reliable). susceptibility() and resistance() gained the argument guideline, which defaults to EUCAST, for interpreting the ‘I’ category correctly. diff --git a/news/index.md b/news/index.md index 65d643d50..9a172bb9b 100644 --- a/news/index.md +++ b/news/index.md @@ -1,6 +1,6 @@ # Changelog -## AMR 3.0.1.9035 +## AMR 3.0.1.9036 #### New @@ -81,6 +81,10 @@ #### Updates +- Extensive `cli` integration for better message handling and clickable + links in messages and warnings + ([\#191](https://github.com/msberends/AMR/issues/191), + [\#265](https://github.com/msberends/AMR/issues/265)) - [`mdro()`](https://amr-for-r.org/reference/mdro.md) now infers resistance for a *missing* base drug column from an *available* corresponding drug+inhibitor combination showing resistance (e.g., diff --git a/pkgdown.yml b/pkgdown.yml index 8cbc27a2f..9ca307c98 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -10,7 +10,7 @@ articles: PCA: PCA.html WHONET: WHONET.html WISCA: WISCA.html -last_built: 2026-03-18T09:40Z +last_built: 2026-03-20T16:06Z urls: reference: https://amr-for-r.org/reference article: https://amr-for-r.org/articles diff --git a/reference/AMR-deprecated.html b/reference/AMR-deprecated.html index bc42298de..3884c83de 100644 --- a/reference/AMR-deprecated.html +++ b/reference/AMR-deprecated.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/AMR-options.html b/reference/AMR-options.html index bd746f465..1bbd9d117 100644 --- a/reference/AMR-options.html +++ b/reference/AMR-options.html @@ -9,7 +9,7 @@ options(AMR_guideline = "CLSI")'>AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/AMR.html b/reference/AMR.html index f7a3b9eee..8ad11956b 100644 --- a/reference/AMR.html +++ b/reference/AMR.html @@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/WHOCC.html b/reference/WHOCC.html index 5dddb0354..25c658dd9 100644 --- a/reference/WHOCC.html +++ b/reference/WHOCC.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/WHONET.html b/reference/WHONET.html index b78e6274b..6c4683aba 100644 --- a/reference/WHONET.html +++ b/reference/WHONET.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/ab_from_text.html b/reference/ab_from_text.html index ca3fc6f41..ba7fd4a4d 100644 --- a/reference/ab_from_text.html +++ b/reference/ab_from_text.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/ab_property.html b/reference/ab_property.html index 9664d1ba7..2092814fb 100644 --- a/reference/ab_property.html +++ b/reference/ab_property.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/add_custom_antimicrobials.html b/reference/add_custom_antimicrobials.html index 4e7c6d1a6..fca559d73 100644 --- a/reference/add_custom_antimicrobials.html +++ b/reference/add_custom_antimicrobials.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -111,7 +111,7 @@ group = "Test Group" ) ) -#> ℹ Added one record to the internal `antimicrobials` data set. +#> ℹ Added one record to the internal `antimicrobials` data set. # "testab" is now a new antibiotic: as.ab("testab") @@ -180,7 +180,7 @@ group = "Beta-lactams/penicillins" ) ) -#> ℹ Added one record to the internal `antimicrobials` data set. +#> ℹ Added one record to the internal `antimicrobials` data set. ab_atc("Co-fluampicil") #> [1] "J01CR50" ab_name("J01CR50") @@ -197,8 +197,7 @@ #> random_column coflu ampicillin #> 1 some value S R x[, betalactams()] -#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and -#> 'ampicillin' +#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and 'ampicillin' #> coflu ampicillin #> 1 S R # } diff --git a/reference/add_custom_antimicrobials.md b/reference/add_custom_antimicrobials.md index 3cea4e75e..944317e93 100644 --- a/reference/add_custom_antimicrobials.md +++ b/reference/add_custom_antimicrobials.md @@ -185,8 +185,7 @@ x #> random_column coflu ampicillin #> 1 some value S R x[, betalactams()] -#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and -#> 'ampicillin' +#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and 'ampicillin' #> coflu ampicillin #> 1 S R # } diff --git a/reference/add_custom_microorganisms.html b/reference/add_custom_microorganisms.html index 336bed35a..f0e3c325e 100644 --- a/reference/add_custom_microorganisms.html +++ b/reference/add_custom_microorganisms.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -109,8 +109,8 @@ species = "asburiae/cloacae" ) ) -#> ℹ Added Enterobacter asburiae/cloacae to the internal `microorganisms` data -#> set. +#> ℹ Added Enterobacter asburiae/cloacae to the internal `microorganisms` data +#> set. # E. asburiae/cloacae is now a new microorganism: mo_name("Enterobacter asburiae/cloacae") @@ -204,8 +204,7 @@ SPECIES = "SPECIES" ) ) -#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data -#> set. +#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data set. mo_name("BACTEROIDES / PARABACTEROIDES") #> [1] "Bacteroides/Parabacteroides" mo_rank("BACTEROIDES / PARABACTEROIDES") @@ -224,8 +223,8 @@ subspecies = c("complex", "") ) ) -#> ℹ Added Citrobacter braakii complex and Citrobacter freundii complex to the -#> internal `microorganisms` data set. +#> ℹ Added Citrobacter braakii complex and Citrobacter freundii complex to the +#> internal `microorganisms` data set. mo_name(c("C. freundii complex", "C. braakii complex")) #> [1] "Citrobacter freundii complex" "Citrobacter braakii complex" mo_species(c("C. freundii complex", "C. braakii complex")) diff --git a/reference/add_custom_microorganisms.md b/reference/add_custom_microorganisms.md index b0c4c7e8e..bb10300cc 100644 --- a/reference/add_custom_microorganisms.md +++ b/reference/add_custom_microorganisms.md @@ -193,8 +193,7 @@ add_custom_microorganisms( SPECIES = "SPECIES" ) ) -#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data -#> set. +#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data set. mo_name("BACTEROIDES / PARABACTEROIDES") #> [1] "Bacteroides/Parabacteroides" mo_rank("BACTEROIDES / PARABACTEROIDES") diff --git a/reference/age.html b/reference/age.html index 630f34db7..59707acbb 100644 --- a/reference/age.html +++ b/reference/age.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -112,16 +112,16 @@ df #> birth_date age age_exact age_at_y2k -#> 1 1999-06-30 26 26.71507 0 -#> 2 1968-01-29 58 58.13151 31 -#> 3 1965-12-05 60 60.28219 34 -#> 4 1980-03-01 46 46.04658 19 -#> 5 1949-11-01 76 76.37534 50 -#> 6 1947-02-14 79 79.08767 52 -#> 7 1940-02-19 86 86.07397 59 -#> 8 1988-01-10 38 38.18356 11 -#> 9 1997-08-27 28 28.55616 2 -#> 10 1978-01-26 48 48.13973 21 +#> 1 1999-06-30 26 26.72055 0 +#> 2 1968-01-29 58 58.13699 31 +#> 3 1965-12-05 60 60.28767 34 +#> 4 1980-03-01 46 46.05205 19 +#> 5 1949-11-01 76 76.38082 50 +#> 6 1947-02-14 79 79.09315 52 +#> 7 1940-02-19 86 86.07945 59 +#> 8 1988-01-10 38 38.18904 11 +#> 9 1997-08-27 28 28.56164 2 +#> 10 1978-01-26 48 48.14521 21
From the shell:
# CRAN check from parent directory R CMD check AMR
The + 1 accounts for the fact that this PR’s squash commit is not yet on the default branch. Set both of these files to the resulting version string (and only once per PR, even across multiple commits):
+ 1
DESCRIPTION
Version:
DESCRIPTION — the Version: field
NEWS.md
# AMR <version>
NEWS.md — only replace line 1 (the # AMR <version> heading) with the new version number; do not create a new section. NEWS.md is a continuous log for the entire current x.y.z.9nnn development series: all changes since the last stable release accumulate under that single heading. After updating line 1, append the new change as a bullet under the appropriate sub-heading (### New, ### Fixes, or ### Updates).
x.y.z.9nnn
### New
### Fixes
### Updates
Style rules for NEWS.md entries:
If git describe fails (e.g. no tags exist in the environment), fall back to reading the current version from DESCRIPTION and adding 1 to the last numeric component — but only if no bump has already been made in this PR.
git describe
Now we can thus clean our data:
our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE) -#> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL", -#> "KLEPNE", "STAAUR", and "STRPNE". -#> ℹ Microorganism translation was uncertain for four microorganisms. Run -#> `mo_uncertainties()` to review these uncertainties, or use -#> `add_custom_microorganisms()` to add custom entries.
Apparently, there was some uncertainty about the translation to taxonomic codes. Let’s check this:
mo_uncertainties() -#> Matching scores are based on the resemblance between the input and the full -#> taxonomic name, and the pathogenicity in humans. See `?mo_matching_score`. -#> Colour keys: 0.000-0.549 0.550-0.649 0.650-0.749 0.750-1.000 -#> -#> -------------------------------------------------------------------------------- -#> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688) -#> Also matched: Enterococcus crotali (0.650), Escherichia coli coli -#> (0.643), Escherichia coli expressing (0.611), Enterobacter cowanii -#> (0.600), Enterococcus columbae (0.595), Enterococcus camelliae (0.591), -#> Enterococcus casseliflavus (0.577), Enterobacter cloacae cloacae -#> (0.571), Enterobacter cloacae complex (0.571), and Enterobacter cloacae -#> dissolvens (0.565) -#> -------------------------------------------------------------------------------- -#> "K. pneumoniae" -> Klebsiella pneumoniae (B_KLBSL_PNMN, 0.786) -#> Also matched: Klebsiella pneumoniae complex (0.707), Klebsiella -#> pneumoniae ozaenae (0.707), Klebsiella pneumoniae pneumoniae (0.688), -#> Klebsiella pneumoniae rhinoscleromatis (0.658), Klebsiella pasteurii -#> (0.500), Klebsiella planticola (0.500), Kingella potus (0.400), -#> Kluyveromyces pseudotropicale (0.386), Kluyveromyces pseudotropicalis -#> (0.363), and Kosakonia pseudosacchari (0.361) -#> -------------------------------------------------------------------------------- -#> "S. aureus" -> Staphylococcus aureus (B_STPHY_AURS, 0.690) -#> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus -#> argenteus (0.625), Staphylococcus aureus anaerobius (0.625), -#> Staphylococcus auricularis (0.615), Salmonella Aurelianis (0.595), -#> Salmonella Aarhus (0.588), Salmonella Amounderness (0.587), -#> Staphylococcus argensis (0.587), Streptococcus australis (0.587), and -#> Salmonella choleraesuis arizonae (0.562) -#> -------------------------------------------------------------------------------- -#> "S. pneumoniae" -> Streptococcus pneumoniae (B_STRPT_PNMN, 0.750) -#> Also matched: Streptococcus pseudopneumoniae (0.700), Streptococcus -#> phocae salmonis (0.552), Serratia proteamaculans quinovora (0.545), -#> Streptococcus pseudoporcinus (0.536), Staphylococcus piscifermentans -#> (0.533), Staphylococcus pseudintermedius (0.532), Serratia -#> proteamaculans proteamaculans (0.526), Streptococcus gallolyticus -#> pasteurianus (0.526), Salmonella Portanigra (0.524), and Streptococcus -#> periodonticum (0.519) -#> -#> Only the first 10 other matches of each record are shown. Run -#> `print(mo_uncertainties(), n = ...)` to view more entries, or save -#> `mo_uncertainties()` to an object.
That’s all good.
first_isolate our_data <- our_data %>% mutate(first = first_isolate(info = TRUE)) -#> ℹ Determining first isolates using an episode length of 365 days -#> ℹ Using column 'bacteria' as input for `col_mo`. -#> ℹ Column 'first' is SIR eligible (despite only having empty values), since -#> it seems to be cefozopran (ZOP) -#> ℹ Using column 'date' as input for `col_date`. -#> ℹ Using column 'patient_id' as input for `col_patient_id`. -#> ℹ Basing inclusion on all antimicrobial results, using a points threshold -#> of 2 -#> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a -#> microbial ID was available) +#> ℹ Determining first isolates using an episode length of 365 days +#> ℹ Using column 'bacteria' as input for `col_mo`. +#> ℹ Column 'first' is SIR eligible (despite only having empty values), since it +#> seems to be cefozopran (ZOP) +#> ℹ Using column 'date' as input for `col_date`. +#> ℹ Using column 'patient_id' as input for `col_patient_id`. +#> ℹ Basing inclusion on all antimicrobial results, using a points threshold of 2 +#> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a +#> microbial ID was available)
our_data <- our_data %>% mutate(first = first_isolate(info = TRUE)) -#> ℹ Determining first isolates using an episode length of 365 days -#> ℹ Using column 'bacteria' as input for `col_mo`. -#> ℹ Column 'first' is SIR eligible (despite only having empty values), since -#> it seems to be cefozopran (ZOP) -#> ℹ Using column 'date' as input for `col_date`. -#> ℹ Using column 'patient_id' as input for `col_patient_id`. -#> ℹ Basing inclusion on all antimicrobial results, using a points threshold -#> of 2 -#> => Found 2,724 'phenotype-based' first isolates (90.8% of total where a -#> microbial ID was available)
So only 91% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:
filter()
dplyr
our_data_1st %>% select(date, aminoglycosides()) -#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) +#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) #> # A tibble: 2,724 × 2 #> date GEN #> <date> <sir> @@ -543,8 +540,8 @@ in: our_data_1st %>% select(bacteria, betalactams()) -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 2,724 × 3 #> bacteria AMX AMC #> <mo> <sir> <sir> @@ -580,7 +577,7 @@ in: # filtering using AB selectors is also possible: our_data_1st %>% filter(any(aminoglycosides() == "R")) -#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) +#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin) #> # A tibble: 981 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -598,8 +595,8 @@ in: our_data_1st %>% filter(all(betalactams() == "R")) -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 462 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -617,8 +614,8 @@ in: # even works in base R (since R 3.0): our_data_1st[all(betalactams() == "R"), ] -#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' -#> (amoxicillin/clavulanic acid) +#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC' +#> (amoxicillin/clavulanic acid) #> # A tibble: 462 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> @@ -699,9 +696,9 @@ previously mentioned antibiotic class selectors: antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems())) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems())) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
language
antibiogram(example_isolates, antibiotics = c(aminoglycosides(), carbapenems()), syndromic_group = "ward") -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
proportion_SI()
our_data_1st %>% resistance(AMX) -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). +#> ℹ This message will be shown once per session. #> [1] 0.4203377
Or can be used in conjunction with group_by() and summarise(), both from the dplyr package:
group_by()
summarise()
Explanation:
step_corr()
prep()
prep(resistance_recipe) -#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' -#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) -#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' -#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' -#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' -#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' -#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), -#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) +#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin), +#> 'AMK' (amikacin), and 'KAN' (kanamycin) +#> ℹ For `betalactams()` using columns 'PEN' (benzylpenicillin), 'OXA' +#> (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC' +#> (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'TZP' +#> (piperacillin/tazobactam), 'CZO' (cefazolin), 'FEP' (cefepime), 'CXM' +#> (cefuroxime), 'FOX' (cefoxitin), 'CTX' (cefotaxime), 'CAZ' (ceftazidime), +#> 'CRO' (ceftriaxone), 'IPM' (imipenem), and 'MEM' (meropenem) +#> #> #> ── Recipe ────────────────────────────────────────────────────────────────────── #> -#> ── Inputs +#> +#> +#> ── Inputs +#> #> Number of variables by role +#> #> outcome: 1 #> predictor: 20 #> -#> ── Training information +#> +#> +#> ── Training information +#> #> Training data contained 1968 data points and no incomplete rows. #> -#> ── Operations +#> +#> +#> ── Operations +#> #> • Correlation filter on: AMX CTX | Trained
pca_result <- pca(resistance_data) -#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", -#> "TMP", and "TOB". Total observations available: 7.
The result can be reviewed with the good old summary() function:
summary()
diff --git a/articles/PCA.md b/articles/PCA.md index 9e63716e5..b90f250cd 100644 --- a/articles/PCA.md +++ b/articles/PCA.md @@ -78,9 +78,10 @@ resistance_data <- example_isolates %>% order, genus, AMC, CXM, CTX, CAZ, GEN, TOB, TMP, SXT ) # and select only relevant columns -#> ℹ `resistance()` assumes the EUCAST guideline and thus considers the 'I' -#> category susceptible. Set the `guideline` argument or the `AMR_guideline` -#> option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus +#> considers the 'I' category susceptible. Set the `guideline` argument or the +#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. head(resistance_data) @@ -104,8 +105,8 @@ variables, so we now only need to do: ``` r pca_result <- pca(resistance_data) -#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", -#> "TMP", and "TOB". Total observations available: 7. +#> ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", "TMP", +#> and "TOB". Total observations available: 7. ``` The result can be reviewed with the good old diff --git a/articles/WHONET.html b/articles/WHONET.html index a46de966e..5d50dbcbc 100644 --- a/articles/WHONET.html +++ b/articles/WHONET.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -255,10 +255,11 @@ Longest: 40 # our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) -#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the -#> 'I' category susceptible. Set the `guideline` argument or the -#> `AMR_guideline` option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session.
# our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) -#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the -#> 'I' category susceptible. Set the `guideline` argument or the -#> `AMR_guideline` option to either "CLSI" or "EUCAST", see `?AMR-options`. -#> ℹ This message will be shown once per session.
Frequency table
Class: factor > ordered > sir (numeric) Length: 500 diff --git a/articles/WHONET.md b/articles/WHONET.md index 21b8030f4..a69d9c2a2 100644 --- a/articles/WHONET.md +++ b/articles/WHONET.md @@ -101,9 +101,10 @@ Longest: 40 # our transformed antibiotic columns # amoxicillin/clavulanic acid (J01CR02) as an example data %>% freq(AMC_ND2) -#> ℹ `susceptibility()` assumes the EUCAST guideline and thus considers the -#> 'I' category susceptible. Set the `guideline` argument or the -#> `AMR_guideline` option to either "CLSI" or "EUCAST", see `?AMR-options`. +#> ℹ `susceptibility()` (`?AMR::susceptibility()`) assumes the EUCAST guideline +#> and thus considers the 'I' category susceptible. Set the `guideline` argument +#> or the `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options +#> (`?AMR::AMR-options`). #> ℹ This message will be shown once per session. ``` diff --git a/articles/WISCA.html b/articles/WISCA.html index 2f3b644f2..8807ee537 100644 --- a/articles/WISCA.html +++ b/articles/WISCA.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/articles/datasets.html b/articles/datasets.html index f9d0d7176..f50b18908 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -30,7 +30,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -80,7 +80,7 @@ Download data sets for download / own use - 18 March 2026 + 20 March 2026 Source: vignettes/datasets.Rmd datasets.Rmd diff --git a/articles/index.html b/articles/index.html index 06f338473..cbbec94db 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/authors.html b/authors.html index 8f7eeef84..23bceff64 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/index.html b/index.html index fbcf8e201..6e4de1802 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/news/index.html b/news/index.html index 985b59a45..fbddfb01e 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -49,9 +49,9 @@ -AMR 3.0.1.9035 +AMR 3.0.1.9036 -New +New Integration with the tidymodels framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via recipes step_mic_log2() to transform <mic> columns with log2, and step_sir_numeric() to convert <sir> columns to numeric @@ -83,7 +83,7 @@ Function amr_course(), which allows for automated download and unpacking of a GitHub repository for e.g. webinar use -Fixes +Fixes Fixed a bug in as.sir() where values that were purely numeric (e.g., "1") and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter Fixed a bug in as.mic() where MIC values in scientific notation (e.g., "1e-3") were incorrectly handled because the letter e was removed along with other Unicode letters; scientific notation e is now preserved Fixed a bug in as.ab() where certain AB codes containing “PH” or “TH” (such as ETH, MTH, PHE, PHN, STH, THA, THI1) would incorrectly return NA when combined in a vector with any untranslatable value (#245) @@ -96,8 +96,9 @@ Fixed SIR and MIC coercion of combined values, e.g. as.sir("<= 0.002; S") or as.mic("S; 0.002") (#252) -Updates - +Updates +Extensive cli integration for better message handling and clickable links in messages and warnings (#191, #265) + mdro() now infers resistance for a missing base drug column from an available corresponding drug+inhibitor combination showing resistance (e.g., piperacillin is absent but required, while piperacillin/tazobactam available and resistant). Can be set with the new argument infer_from_combinations, which defaults to TRUE (#209). Note that this can yield a higher MDRO detection (which is a good thing as it has become more reliable). susceptibility() and resistance() gained the argument guideline, which defaults to EUCAST, for interpreting the ‘I’ category correctly. diff --git a/news/index.md b/news/index.md index 65d643d50..9a172bb9b 100644 --- a/news/index.md +++ b/news/index.md @@ -1,6 +1,6 @@ # Changelog -## AMR 3.0.1.9035 +## AMR 3.0.1.9036 #### New @@ -81,6 +81,10 @@ #### Updates +- Extensive `cli` integration for better message handling and clickable + links in messages and warnings + ([\#191](https://github.com/msberends/AMR/issues/191), + [\#265](https://github.com/msberends/AMR/issues/265)) - [`mdro()`](https://amr-for-r.org/reference/mdro.md) now infers resistance for a *missing* base drug column from an *available* corresponding drug+inhibitor combination showing resistance (e.g., diff --git a/pkgdown.yml b/pkgdown.yml index 8cbc27a2f..9ca307c98 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -10,7 +10,7 @@ articles: PCA: PCA.html WHONET: WHONET.html WISCA: WISCA.html -last_built: 2026-03-18T09:40Z +last_built: 2026-03-20T16:06Z urls: reference: https://amr-for-r.org/reference article: https://amr-for-r.org/articles diff --git a/reference/AMR-deprecated.html b/reference/AMR-deprecated.html index bc42298de..3884c83de 100644 --- a/reference/AMR-deprecated.html +++ b/reference/AMR-deprecated.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/AMR-options.html b/reference/AMR-options.html index bd746f465..1bbd9d117 100644 --- a/reference/AMR-options.html +++ b/reference/AMR-options.html @@ -9,7 +9,7 @@ options(AMR_guideline = "CLSI")'>AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/AMR.html b/reference/AMR.html index f7a3b9eee..8ad11956b 100644 --- a/reference/AMR.html +++ b/reference/AMR.html @@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/WHOCC.html b/reference/WHOCC.html index 5dddb0354..25c658dd9 100644 --- a/reference/WHOCC.html +++ b/reference/WHOCC.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/WHONET.html b/reference/WHONET.html index b78e6274b..6c4683aba 100644 --- a/reference/WHONET.html +++ b/reference/WHONET.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/ab_from_text.html b/reference/ab_from_text.html index ca3fc6f41..ba7fd4a4d 100644 --- a/reference/ab_from_text.html +++ b/reference/ab_from_text.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/ab_property.html b/reference/ab_property.html index 9664d1ba7..2092814fb 100644 --- a/reference/ab_property.html +++ b/reference/ab_property.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 diff --git a/reference/add_custom_antimicrobials.html b/reference/add_custom_antimicrobials.html index 4e7c6d1a6..fca559d73 100644 --- a/reference/add_custom_antimicrobials.html +++ b/reference/add_custom_antimicrobials.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -111,7 +111,7 @@ group = "Test Group" ) ) -#> ℹ Added one record to the internal `antimicrobials` data set. +#> ℹ Added one record to the internal `antimicrobials` data set. # "testab" is now a new antibiotic: as.ab("testab") @@ -180,7 +180,7 @@ group = "Beta-lactams/penicillins" ) ) -#> ℹ Added one record to the internal `antimicrobials` data set. +#> ℹ Added one record to the internal `antimicrobials` data set. ab_atc("Co-fluampicil") #> [1] "J01CR50" ab_name("J01CR50") @@ -197,8 +197,7 @@ #> random_column coflu ampicillin #> 1 some value S R x[, betalactams()] -#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and -#> 'ampicillin' +#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and 'ampicillin' #> coflu ampicillin #> 1 S R # } diff --git a/reference/add_custom_antimicrobials.md b/reference/add_custom_antimicrobials.md index 3cea4e75e..944317e93 100644 --- a/reference/add_custom_antimicrobials.md +++ b/reference/add_custom_antimicrobials.md @@ -185,8 +185,7 @@ x #> random_column coflu ampicillin #> 1 some value S R x[, betalactams()] -#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and -#> 'ampicillin' +#> ℹ For `betalactams()` using columns 'coflu' (co-fluampicil) and 'ampicillin' #> coflu ampicillin #> 1 S R # } diff --git a/reference/add_custom_microorganisms.html b/reference/add_custom_microorganisms.html index 336bed35a..f0e3c325e 100644 --- a/reference/add_custom_microorganisms.html +++ b/reference/add_custom_microorganisms.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -109,8 +109,8 @@ species = "asburiae/cloacae" ) ) -#> ℹ Added Enterobacter asburiae/cloacae to the internal `microorganisms` data -#> set. +#> ℹ Added Enterobacter asburiae/cloacae to the internal `microorganisms` data +#> set. # E. asburiae/cloacae is now a new microorganism: mo_name("Enterobacter asburiae/cloacae") @@ -204,8 +204,7 @@ SPECIES = "SPECIES" ) ) -#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data -#> set. +#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data set. mo_name("BACTEROIDES / PARABACTEROIDES") #> [1] "Bacteroides/Parabacteroides" mo_rank("BACTEROIDES / PARABACTEROIDES") @@ -224,8 +223,8 @@ subspecies = c("complex", "") ) ) -#> ℹ Added Citrobacter braakii complex and Citrobacter freundii complex to the -#> internal `microorganisms` data set. +#> ℹ Added Citrobacter braakii complex and Citrobacter freundii complex to the +#> internal `microorganisms` data set. mo_name(c("C. freundii complex", "C. braakii complex")) #> [1] "Citrobacter freundii complex" "Citrobacter braakii complex" mo_species(c("C. freundii complex", "C. braakii complex")) diff --git a/reference/add_custom_microorganisms.md b/reference/add_custom_microorganisms.md index b0c4c7e8e..bb10300cc 100644 --- a/reference/add_custom_microorganisms.md +++ b/reference/add_custom_microorganisms.md @@ -193,8 +193,7 @@ add_custom_microorganisms( SPECIES = "SPECIES" ) ) -#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data -#> set. +#> ℹ Added Bacteroides/Parabacteroides to the internal `microorganisms` data set. mo_name("BACTEROIDES / PARABACTEROIDES") #> [1] "Bacteroides/Parabacteroides" mo_rank("BACTEROIDES / PARABACTEROIDES") diff --git a/reference/age.html b/reference/age.html index 630f34db7..59707acbb 100644 --- a/reference/age.html +++ b/reference/age.html @@ -7,7 +7,7 @@ AMR (for R) - 3.0.1.9035 + 3.0.1.9036 @@ -112,16 +112,16 @@ df #> birth_date age age_exact age_at_y2k -#> 1 1999-06-30 26 26.71507 0 -#> 2 1968-01-29 58 58.13151 31 -#> 3 1965-12-05 60 60.28219 34 -#> 4 1980-03-01 46 46.04658 19 -#> 5 1949-11-01 76 76.37534 50 -#> 6 1947-02-14 79 79.08767 52 -#> 7 1940-02-19 86 86.07397 59 -#> 8 1988-01-10 38 38.18356 11 -#> 9 1997-08-27 28 28.55616 2 -#> 10 1978-01-26 48 48.13973 21 +#> 1 1999-06-30 26 26.72055 0 +#> 2 1968-01-29 58 58.13699 31 +#> 3 1965-12-05 60 60.28767 34 +#> 4 1980-03-01 46 46.05205 19 +#> 5 1949-11-01 76 76.38082 50 +#> 6 1947-02-14 79 79.09315 52 +#> 7 1940-02-19 86 86.07945 59 +#> 8 1988-01-10 38 38.18904 11 +#> 9 1997-08-27 28 28.56164 2 +#> 10 1978-01-26 48 48.14521 21
vignettes/datasets.Rmd
datasets.Rmd
recipes
step_mic_log2()
<mic>
step_sir_numeric()
<sir>
amr_course()
as.sir()
"1"
as.mic()
"1e-3"
e
as.ab()
ETH
MTH
PHE
PHN
STH
THA
THI1
NA
as.sir("<= 0.002; S")
as.mic("S; 0.002")
cli
mdro()
infer_from_combinations
TRUE
susceptibility()
resistance()
guideline