1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-14 20:30:19 +01:00

Replace RSI with SIR

This commit is contained in:
Dr. Matthijs Berends
2023-01-21 23:47:20 +01:00
committed by GitHub
parent 24b12024ce
commit 98e62c9af2
127 changed files with 1746 additions and 1648 deletions

View File

@@ -31,7 +31,7 @@ library(AMR)
library(dplyr)
int_resis <- data.frame(mo = microorganisms$mo, stringsAsFactors = FALSE)
for (i in seq_len(nrow(antibiotics))) {
int_resis$new <- as.rsi("S")
int_resis$new <- as.sir("S")
colnames(int_resis)[ncol(int_resis)] <- antibiotics$ab[i]
}
@@ -43,7 +43,7 @@ int_resis <- eucast_rules(int_resis,
info = FALSE
)
int_resis2 <- int_resis[, sapply(int_resis, function(x) any(!is.rsi(x) | x == "R")), drop = FALSE] %>%
int_resis2 <- int_resis[, sapply(int_resis, function(x) any(!is.sir(x) | x == "R")), drop = FALSE] %>%
tidyr::pivot_longer(-mo) %>%
filter(value == "R") %>%
select(mo, ab = name)