mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 06:30:48 +01:00
(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:
1 parent
08aa47842e
commit
30021a9831
12 files changed
+153
-79
No files matched your search
@@ -1178,8 +1178,10 @@ get_guideline <- function(guideline, reference_data) {
|
||||
return(guideline)
|
||||
}
|
||||
guideline_param <- trimws2(toupper(guideline))
|
||||
latest_clsi <- rev(sort(subset(reference_data, guideline %like% "CLSI")$guideline))[1L]
|
||||
latest_eucast <- rev(sort(subset(reference_data, guideline %like% "EUCAST")$guideline))[1L]
|
||||
# only the unique guidelines are needed, which is much faster than subsetting the whole table
|
||||
guidelines_available <- unique(reference_data$guideline)
|
||||
latest_clsi <- rev(sort(guidelines_available[guidelines_available %like% "CLSI"]))[1L]
|
||||
latest_eucast <- rev(sort(guidelines_available[guidelines_available %like% "EUCAST"]))[1L]
|
||||
guideline_param[guideline_param == "CLSI"] <- latest_clsi
|
||||
guideline_param[guideline_param == "EUCAST"] <- latest_eucast
|
||||
# like 'EUCAST2020', should be 'EUCAST 2020'
|
||||
|
||||
Reference in new issue
Block a user