Commit Graph
1366 Commits
Author SHA1 Message Date
uzumakienes 904656241f Bump version and add NEWS entry 2026-10-23 16:46:42 +03:00
dr. M.S. (Matthijs) Berends 4e806b3d40 (v3.1.0.9005) Fix the CI check on R-oldrel-5 by letting pak ignore readxl on R versions older than 4.2, and by not forcing suggested packages in R CMD check 2026-10-23 14:15:49 +02:00
dr. M.S. (Matthijs) BerendsandClaude Sonnet 5.5 5fc152ae94 (v3.1.0.9004) Document the columns argument of the tidymodels steps to fix the Rd usage warning in R CMD check
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 18:23:06 +02:00
dr. M.S. (Matthijs) Berends bd208429cd (v3.1.0.9003) Rewrite the manual index on the website for findability: sections ordered by task (cleaning data, interpreting results as SIR, analysing data), titles before function names, a filter field that also finds topics mentioning a term, and colours prepared for dark mode; also make the tidymodels extensions public in the manual and use consistent help page titles 2026-10-17 09:36:10 +02:00
dr. M.S. (Matthijs) Berends 52d9c4a9e7 (v3.1.0.9002) Add a release checklist (release.md) with all steps of a regular CRAN release 2026-10-16 14:23:01 +02:00
dr. M.S. (Matthijs) Berends 5a4387a141 (v3.1.0.9001) Update the MO code registry with the codes of release v3.1.0, and the versions in the bug report template 2026-10-16 14:19:48 +02:00
dr. M.S. (Matthijs) Berends 052edc4761 v3.1.0 2026-10-16 14:11:02 +02:00
dr. M.S. (Matthijs) Berends 6898472c8a (v3.0.1.9154) Shorten an example comment of wisca() to fix the Rd line widths NOTE 2026-10-16 06:32:46 +02:00
dr. M.S. (Matthijs) Berends 30021a9831 (v3.0.1.9153) Speed up mdro(), as.sir(), wisca() and wisca_plot() and the binding of mo vectors, fix PDR in the CMI 2012 guideline of mdro() being assigned to the wrong rows, and limit the stratified WISCA example to the 5 most common species 2026-10-16 06:08:26 +02:00
dr. M.S. (Matthijs) Berends 08aa47842e (v3.0.1.9152) Let a named colours_SIR without S, I or R use the default colours for these, which fixes the example of ggplot_sir() with colours = c(SI = "yellow"), let ggplot_sir() pass the facet as a value to facet_sir(), and make the test of the eucast_I default independent of the AMR_guideline option 2026-10-16 04:34:52 +02:00
dr. M.S. (Matthijs) Berends 43accd35d1 (v3.0.1.9151) Fix inconsistencies in the plotting functions and correct the translations of the interpretation categories
Plotting:
- Base colours and legends of interpreted MIC and disk values on the interpretation itself instead of matching colours
- Fix SDD in autoplot() for disks, the colours of barplot() for SIR values, and barplot() for MICs ignoring language and expand
- Match a named colours_SIR by name; let keep_operators = TRUE/FALSE in scale_*_mic() behave as "all"/"none"
- Let a named values in scale_*_sir() replace the colours it names, warn in scale_x_sir(), and pass other arguments on
- Let the default of eucast_I follow the guideline option, also for EUCAST before 2019
- Support unquoted column names in facet_sir() without evaluating them
- Correct the documentation and examples

Translations:
- Add SDD, NS, WT and NWT, and correct S, I, R and NI in 18 languages
- Sources of the terms for 'I': NAK via German laboratories (de), SZU national reference laboratory (cs), lex.dk (da), Karolinska University Hospital (sv), COESANT (es), Nordlab (fi), CA-SFM (fr); no by analogy with da and sv
- Not verified against an official source: ar, bn, el, hi, id, ja, ko, pl, ro, ru, sw, tr, uk, ur, vi, zh

Tests:
- Let the grouped antibiogram test use English so it passes in other locales
2026-10-15 22:25:20 +02:00
dr. M.S. (Matthijs) Berends b63263cc56 (v3.0.1.9150) Add the open issues found while correcting the WHONET codes to the taxonomy report 2026-10-15 21:31:28 +02:00
dr. M.S. (Matthijs) Berends eb9a9c2fa5 (v3.0.1.9149) Fix WHONET codes in microorganisms.codes that referred to unrelated microorganisms, let codes refer to the name they were named after and add a source column, and replace the fuzzy matching of WHONET names by exact matching with a guard against unreviewed remaps
WHONET names are now matched exactly (also outdated names, after removing qualifiers), then on GBIF identifier, and fuzzy results are only kept if consistent with that; otherwise the genus or UNKNOWN is used. A code refers to the record of the name it was named after (e.g. EAE is Enterobacter aerogenes) if that name refers to the same taxon. Every remap of an existing code to another taxon must be listed in data-raw/whonet_remaps_reviewed.csv; the 198 remaps of this rebuild were reviewed.
2026-10-15 21:08:04 +02:00
dr. M.S. (Matthijs) Berends 179eec584f (v3.0.1.9148) Store zone diameters without S category as blocking rows for EUCAST and as R-only rows for CLSI instead of capping them at 50 mm, let as.mo() return the complex for names such as 'Acinetobacter calcoaceticus-baumannii complex', make the breakpoint reproduction scripts stop on unchecked data defects and year-independent, and document that as.disk() returns NA above 50 mm
The full rebuild of clinical_breakpoints also assigns Salmonella serovars and the Bacteroides fragilis complex correctly and adds ECOFFs for Neocosmospora solani. The rebuilt microorganisms.codes is not included, since it remaps WHONET codes that need review first.
2026-10-15 17:05:41 +02:00
dr. M.S. (Matthijs) Berends fcfaa87f5d (v3.0.1.9147) Keep EUCAST blocking rows for infections other than UTI where EUCAST only gives a UTI breakpoint, e.g. breakpoints in brackets for aminoglycosides in Acinetobacter, and let as.sir() with unknown uti consistently prefer non-UTI breakpoints, use UTI breakpoints only if no others exist and note this in sir_interpretation_history() every time
The pruning of blocking rows in the EUCAST reproduction script now compares UTI status too, and the script is fixed for the renamed column of the as.ab() coercion cache. In clinical_breakpoints, only the blocking rows were replaced (356 organism/agent/method combinations newly blocked, none unblocked); other changes of a full rebuild, caused by taxonomy updates in the WHONET-based rows, are not included.
2026-10-15 14:55:57 +02:00
dr. M.S. (Matthijs) Berends d69e7fa740 (v3.0.1.9146) Correct the comment in the EUCAST reproduction script stating that breakpoints in brackets are excluded from clinical_breakpoints: they are kept as blocking rows without values 2026-10-15 12:13:56 +02:00
dr. M.S. (Matthijs) Berends b3ecc01657 Show translated pathogen names instead of microorganism codes in grouped traditional antibiograms, including for unknown species 2026-10-15 10:31:07 +02:00
dr. M.S. (Matthijs) Berends eb6d07e1fe Include isolates of unknown species in grouped antibiograms and in wisca(), which were silently excluded with the warning 'invalid microorganism code, NA generated' 2026-10-15 10:21:44 +02:00
dr. M.S. (Matthijs) Berends 0efc8826c8 Let aggregated analyses follow the guideline for the 'I' category in count_df(), proportion_df(), sir_df(), the plotting functions, antibiogram(), wisca(), and bug_drug_combinations(), deprecate combine_SI in favour of guideline, fix format() on bug_drug_combinations() counting I as resistant, and add a shared section 'Interpretation of SIR' 2026-10-15 09:58:21 +02:00
dr. M.S. (Matthijs) Berends dbd95ffa46 (v3.0.1.9137) Add the guideline argument to count_df(), proportion_df(), sir_df(), ggplot_sir(), geom_sir(), and labels_sir_count(), so that with CLSI the 'I' category is merged with R, and describe in the documentation of get_AMR_locale() that LANG takes precedence over LANGUAGE 2026-10-15 08:25:37 +02:00
dr. M.S. (Matthijs) Berends 46f5de1d36 (v3.0.1.9136) Fix the CI entry with a Dutch locale by using a UTF-8 locale that is installed on the runner, and skip the mo_source tests with skip_if() so that the tinytest harness for old R versions supports them 2026-10-15 00:11:07 +02:00
dr. M.S. (Matthijs) Berends 8b01bcb23c (v3.0.1.9135) Fix get_mo_source() removing the mo_source file at the default location, returning the wrong mo_source, and throwing an error after the original file was moved, and run the unit tests in CI also in a real interactive session and with a user setup, a Dutch locale, and CLSI as default guideline, with tests that no longer assume an English locale or EUCAST 2026-10-14 23:34:45 +02:00
dr. M.S. (Matthijs) Berends 4be7352843 (v3.0.1.9134) Add session cache assertions for separate as.ab() and as.mo() calls, for get_mo_source() without a file, and for real cache hits, which detect the cache being emptied in interactive sessions 2026-10-14 22:49:00 +02:00
dr. M.S. (Matthijs) Berends e88faf8d40 (v3.0.1.9133) Fix the as.mo() session cache being cleared on every call in interactive sessions without an mo_source file 2026-10-14 21:59:02 +02:00
dr. M.S. (Matthijs) Berends 1a1a3abed1 (v3.0.1.9132) Make translating around 50 times faster and coercion of unknown input in as.ab() up to 70 times faster with identical results, use DOIs instead of PubMed URLs, shorten an example line, and reword cran-comments.md 2026-10-14 20:17:28 +02:00
dr. M.S. (Matthijs) Berends 4115db67fa (v3.0.1.9131) Remove the list of breaking changes from cran-comments.md 2026-10-13 22:30:31 +02:00
dr. M.S. (Matthijs) Berends 8b3bc220ed (v3.0.1.9130) Add workflow to check reverse dependencies against the development version on every push to main, list WT/NWT for ECOFFs as breaking change, and update cran-comments.md for v3.1.0 2026-10-13 22:25:28 +02:00
dr. M.S. (Matthijs) Berends 9ebc33a59d (v3.0.1.9129) Add guideline argument to random_mic() and random_disk() so that values are based on one guideline version, make guideline years in examples, vignettes and website always the latest, and reword NEWS 2026-10-13 21:43:19 +02:00
dr. M.S. (Matthijs) Berends c8f6cea0a7 (v3.0.1.9128) Revamp console output of interpretive_rules() with cli styling and guideline-dependent SIR colours, make it 11 to 18 times faster with identical results, and fix counts of values that were not actually written (#259) 2026-10-13 12:27:38 +02:00
dr. M.S. (Matthijs) Berends bbfefe65ed (v3.0.1.9127) update NEWS 2026-10-13 08:44:38 +02:00
dr. M.S. (Matthijs) Berends 32fc9bd689 (v3.0.1.9126) Improve translations of combination names and antimicrobial groups in 20 languages (not en, nl, uk, fr) 2026-10-12 22:56:12 +02:00
dr. M.S. (Matthijs) Berends 04a2f0b3ac (v3.0.1.9125) Fix translations being translated again (e.g. Ticarcillinee, groupee) and untranslated parts of combination names, and let as.mo() recognise translated names in the set language, cached per language 2026-10-12 22:25:57 +02:00
dr. M.S. (Matthijs) Berends d4ba5051e7 (v3.0.1.9124) Update French CoNS name in translation test after improved French translations (#322) 2026-10-12 21:39:36 +02:00
dr. M.S. (Matthijs) Berends bf12e3abe7 (v3.0.1.9123) Add method argument to sir_combine() for resistance within a group (most_resistant), and restore the AMR 3.0.1 behaviour of count_*() and proportion_*() for multiple antimicrobials (#321) 2026-10-12 21:37:13 +02:00
dr. M.S. (Matthijs) Berends 239c5a87a8 (v3.0.1.9122) NEWS update 2026-10-12 12:55:27 +02:00
dr. M.S. (Matthijs) Berends 0293d296aa (v3.0.1.9121) styler 2026-10-12 11:42:06 +02:00
Claude c8cb36ddcf (v3.0.1.9120) Improve French translations, fixes #322
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015b8mvB1tZ7LeCiLkwaBs5k
2026-10-12 07:55:34 +00:00
dr. M.S. (Matthijs) Berends e19eabe828 (v3.0.1.9119) update doc 2026-10-11 23:03:06 +02:00
dr. M.S. (Matthijs) Berends 36e6388868 (v3.0.1.9118) update doc 2026-10-11 22:32:15 +02:00
dr. M.S. (Matthijs) Berends 10053d582e (v3.0.1.9117) Fix static test in test-zzz.R to run without testthat (R 3.0/4.0 tinytest) 2026-10-11 22:15:43 +02:00
dr. M.S. (Matthijs) Berends 53d0704271 (v3.0.1.9116) New sir_combine() for combination therapy as one engine for antibiogram(), wisca(), count_*() and proportion_*() (#321), and make all suggested packages runtime-only with a new CI workflow without dplyr
- New sir_combine() to combine SIR results of multiple antimicrobials into one variable; antibiogram(), wisca() and the count/proportion functions now use the same engine (antibiogram() and wisca() output unchanged)
- With multiple antimicrobials, count_*() and proportion_*() now follow the documented combination therapy rules: resistance() is the proportion of failing combinations, count_all() excludes isolates with an unknown combination result, and WT/NWT/NS/NI are handled correctly
- where() is now decided at runtime instead of at installation, fixing antibiogram() and wisca() without tidyselect (e.g. CRAN binaries without dplyr)
- Imports from data.table and cli moved to .onLoad(); data.table functions are only used while it is loaded; the like() example no longer unloads data.table, which crashed R
- Static test that fails on code outside functions depending on suggested packages
- New check-without-dplyr workflow: installs AMR with all suggested packages, removes dplyr (and tidyselect), then runs all unit tests and examples against the installed package
- g.test() now returns the degrees of freedom as 'parameter', so they are printed
- Fix R CMD check NOTEs (hidden .claude folder, lost braces in inherited g.test and ggplot_pca docs)
2026-10-11 20:36:31 +02:00
dr. M.S. (Matthijs) Berends 80afedeb8c (v3.0.1.9115) Fix interpretation of capped MICs without an S category (off-scale S breakpoint) or without breakpoints in as.sir(), and correct the documented default of capped_mic_handling (#295) 2026-10-11 15:40:09 +02:00
dr. M.S. (Matthijs) Berends 9e609dae83 (v3.0.1.9114) Fix errors without cli and on R 3.0, and make the tinytest pipeline actually run the unit tests
Package:
- stop_() called cli::ansi_has_hyperlink_support() before checking that cli is available, so without cli every error became "there is no package called 'cli'"
- interpretive_rules() failed on R 3.0 for guidelines without AmpC rules (assignment to zero rows)
- Guard the ggplot2 example of wisca_plot()

CI:
- check-old: R 3.0 could not install tinytest over HTTPS, so no unit tests ran; install it with curl, and fail when tinytest is missing or any test fails
- tinytest shim: record expectations in the test file environment, support skips and errors per test_that() block, add missing testthat equivalents, source helper files
- Add R 4.0 (oldrel-6) to check-old, and oldrel-5 to check-recent
2026-10-10 14:54:15 +02:00
dr. M.S. (Matthijs) Berends f0699c6584 (v3.0.1.9113) Fix infinite loop in the plain-text message fallback (used without cli or with old cli/rlang), e.g. for wisca(parallel = TRUE) without a future plan 2026-10-10 13:27:54 +02:00
dr. M.S. (Matthijs) Berends 01ca2b98ac (v3.0.1.9112) Fix detection of non-UTF-8 input in as.ab() and add_custom_antimicrobial_synonyms() on R 4.2 and older, where enc2utf8() escapes invalid bytes 2026-10-10 12:49:13 +02:00
dr. M.S. (Matthijs) Berends 31692a26d1 (v3.0.1.9111) Let the TODO tracker fail when markers lack an issue reference, after updating #231 2026-10-10 11:47:33 +02:00
dr. M.S. (Matthijs) Berends aa462e0ad6 (v3.0.1.9110) Link all code TODO markers to issues (#317, #318, #319), and stop counting the WHONET code "XXX" in the TODO tracker 2026-10-10 11:46:17 +02:00
dr. M.S. (Matthijs) Berends 16a13ba81f (v3.0.1.9109) Fix WHONET codes SUD and ROX in clinical_breakpoints, and add sulbactam/durlobactam (#308) 2026-10-10 09:42:25 +02:00
dr. M.S. (Matthijs) Berends 6a778daeb8 (v3.0.1.9108) Fix the seed in index.Rmd, so that the WISCA output in index.md no longer changes on every build 2026-10-10 09:14:29 +02:00
tori0513 3eeabf542a Add add_custom_antimicrobial_synonyms() (#307) (#311)
Adds add_custom_antimicrobial_synonyms() to add local names, such as trade names, to existing antimicrobials, also via the AMR_custom_ab option. Matching is language-independent; as.ab() now returns NA with a warning for input that is not valid UTF-8.
2026-10-10 09:14:07 +02:00