1
0
mirror of https://github.com/msberends/AMR.git synced 2026-05-31 11:01:42 +02:00
Files
AMR/R
Claude 6ece73cb22 Fix as.sir() data.frame: preserve already-<sir> columns, exclude metadata
Issue #278: two related bugs in the column-detection / type-assignment pipeline.

Bug 1 – already-<sir> columns deleted on re-run
  Line 886 excluded already-sir columns from the type assignment (they
  stayed type "") causing the result loop to do x[,col] <- NULL, deleting
  them.  Fix: drop the !is.sir() guard so all untyped columns fall through
  to type "sir" and are re-processed correctly.

Bug 2 – metadata columns treated as antibiotics
  as.ab("patient") -> OXY, as.ab("ward") -> PRU.  The column detector
  accepted any column whose name matched an antibiotic code, regardless of
  content.  Fix: for name-matched columns that do not already carry an AMR
  class, also verify content looks like AMR data (all_valid_mics, all-
  numeric, or any SIR-like string).  all_valid_disks() is intentionally
  avoided here because it strips letters from strings (as.disk("Pt_1")==1).

Also adds tools/benchmark_parallel.R: a standalone script that times
sequential vs parallel as.sir() across n=20/200/2000/20000 rows and
saves a ggplot2 PNG to tools/benchmark_parallel.png.

https://claude.ai/code/session_012DXCXbZUC54Zij1z9bFiHR
2026-04-24 21:30:21 +00:00
..
2025-04-29 16:15:18 +02:00
2026-04-21 22:11:40 +02:00
2026-04-04 11:51:50 +02:00
2026-03-11 16:07:31 +01:00
2026-03-24 12:44:47 +01:00
2025-04-12 11:46:42 +02:00
2026-03-24 12:44:47 +01:00
2025-04-12 11:46:42 +02:00
2026-03-23 10:38:28 +01:00
2025-06-02 12:11:00 +02:00
2025-04-12 11:46:42 +02:00
2026-04-21 22:11:40 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2026-04-22 08:16:44 +02:00
2026-03-30 10:01:49 +02:00
2026-03-23 10:38:28 +01:00
2025-06-13 16:12:28 +02:00
2026-03-23 10:38:28 +01:00
2026-03-22 20:44:37 +01:00
2025-04-12 11:46:42 +02:00
2026-04-04 11:51:50 +02:00
2025-04-12 11:46:42 +02:00