mirror of
https://github.com/msberends/AMR.git
synced 2026-03-29 23:35:52 +02:00
- Ran reproduction_of_microorganisms.groups.R and reproduction_of_clinical_breakpoints.R against the latest WHONET/AMRIE source (includes EUCAST 2026, CLSI 2025) - Updated data/clinical_breakpoints.rda, microorganisms.codes.rda, microorganisms.groups.rda, and data-raw/organisms.rds - Fixed reproduction_of_microorganisms.groups.R: replaced base ifelse() with dplyr::if_else() to preserve the <mo> S3 class; base ifelse() strips class attributes, causing bind_rows() to fail with strict vctrs type checking in dplyr >= 1.1.0 - Added data-raw/_run_reproduction.R: non-interactive wrapper that overrides View(), sets UTF-8 locale, and sources both scripts in the correct order https://claude.ai/code/session_01S5vMqfsiJb59RN2Gyz1tDY
28 lines
930 B
R
28 lines
930 B
R
# Wrapper to run clinical breakpoints reproduction non-interactively
|
|
# Set UTF-8 locale so gsub() can handle Unicode patterns
|
|
Sys.setlocale("LC_CTYPE", "C.utf8")
|
|
Sys.setlocale("LC_ALL", "C.utf8")
|
|
|
|
# Overrides View() to just print a summary instead
|
|
View <- function(x, title = NULL) {
|
|
if (is.data.frame(x) || is.matrix(x)) {
|
|
cat("=== View() called:", if (!is.null(title)) title else deparse(substitute(x)), "===\n")
|
|
cat("Dimensions:", nrow(x), "rows x", ncol(x), "cols\n")
|
|
print(head(x, 10))
|
|
cat("...\n\n")
|
|
} else {
|
|
print(x)
|
|
}
|
|
invisible(x)
|
|
}
|
|
|
|
setwd("/home/user/AMR")
|
|
|
|
cat("=== Step 1: Running reproduction_of_microorganisms.groups.R ===\n")
|
|
source("data-raw/_reproduction_scripts/reproduction_of_microorganisms.groups.R")
|
|
|
|
cat("\n=== Step 2: Running reproduction_of_clinical_breakpoints.R ===\n")
|
|
source("data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints.R")
|
|
|
|
cat("\n=== Done! ===\n")
|