(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

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-16 06:08:26 +02:00
1 parent 08aa47842e
commit 30021a9831
12 files changed
+153 -79

No files matched your search

+10
View File
@@ -724,6 +724,16 @@ return_after_integrity_check <- function(value, type, check_vector) {
value
}
return_after_mo_integrity_check <- function(value) {
# same as return_after_integrity_check(), but with a hashed lookup of the codes, see mo_codes_valid()
valid <- is.na(value) | mo_codes_valid(value)
if (!all(valid)) {
warning_("invalid microorganism code, NA generated")
value[!valid] <- NA
}
value
}
# transforms data set to a tibble with only ASCII values, to comply with CRAN policies
dataset_UTF8_to_ASCII <- function(df) {
trans <- function(vect) {