1
0
mirror of https://github.com/msberends/AMR.git synced 2026-03-11 17:47:50 +01:00

eucast_rules(): add add_if_missing argument to control NA imputation (#259)

When `add_if_missing = FALSE`, rules are only applied to cells that already
contain an SIR value; `NA` cells are left untouched. This is useful with
`overwrite = TRUE` to update reported results without imputing values for
drugs that were not tested.

https://claude.ai/code/session_01Nucc8nXGLqNUjtuC9GrhTc
This commit is contained in:
Claude
2026-03-09 20:00:06 +00:00
parent 353eaa3f38
commit 1d48012355
3 changed files with 24 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
# AMR 3.0.1.9033
# AMR 3.0.1.9034
### New
* Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes`
@@ -15,6 +15,7 @@
- Functions such as `susceptibility()` count WT as S and NWT as R
* `interpretive_rules()`, which allows future implementation of CLSI interpretive rules (#235)
- `eucast_rules()` has become a wrapper around that function
* `eucast_rules()` / `interpretive_rules()` gained argument `add_if_missing` (default: `TRUE`). When set to `FALSE`, rules are only applied to cells that already contain an SIR value; `NA` cells are left untouched. This is useful with `overwrite = TRUE` to update reported results without imputing values for drugs that were not tested (#259)
* Two new `NA` objects, `NA_ab_` and `NA_mo_`, analogous to base R's `NA_character_` and `NA_integer_`, for use in pipelines that require typed missing values
### Fixes