1
0
mirror of https://github.com/msberends/AMR.git synced 2025-05-02 19:43:58 +02:00

(v2.1.1.9255) fix examples

This commit is contained in:
dr. M.S. (Matthijs) Berends 2025-04-26 16:35:14 +02:00
parent 92316d5ddc
commit d166aa2c1d
No known key found for this signature in database
5 changed files with 6 additions and 13 deletions

View File

@ -35,7 +35,7 @@ on:
name: Publish GPT Training Data to GitHub name: Publish GPT Training Data to GitHub
jobs: jobs:
update-pypi: update-amr-assistant:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 2.1.1.9254 Version: 2.1.1.9255
Date: 2025-04-26 Date: 2025-04-26
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 2.1.1.9254 # AMR 2.1.1.9255
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)* *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)*

10
R/sir.R
View File

@ -146,7 +146,7 @@
#' options(AMR_breakpoint_type = "animal") #' options(AMR_breakpoint_type = "animal")
#' ``` #' ```
#' #'
#' ###### TODO #187 When applying veterinary breakpoints (by setting `host` or by setting `breakpoint_type = "animal"`), the [CLSI VET09 guideline](https://clsi.org/standards/products/veterinary-medicine/documents/vet09/) will be applied to cope with missing animal species-specific breakpoints. ###### TODO #187 When applying veterinary breakpoints (by setting `host` or by setting `breakpoint_type = "animal"`), the [CLSI VET09 guideline](https://clsi.org/standards/products/veterinary-medicine/documents/vet09/) will be applied to cope with missing animal species-specific breakpoints.
#' #'
#' ### After Interpretation #' ### After Interpretation
#' #'
@ -994,12 +994,7 @@ as.sir.data.frame <- function(x,
sir_logs_all <- lapply(result_list, function(x) x$log) sir_logs_all <- lapply(result_list, function(x) x$log)
sir_logs_all <- Filter(Negate(is.null), sir_logs_all) # remove NULLs early sir_logs_all <- Filter(Negate(is.null), sir_logs_all) # remove NULLs early
if (length(sir_logs_all) > 0) { if (length(sir_logs_all) > 0) {
rbindlist <- import_fn("rbindlist", "data.table", error_on_fail = FALSE) sir_logs_all <- do.call(rbind_AMR, sir_logs_all)
if (!is.null(rbindlist)) {
sir_logs_all <- rbindlist(sir_logs_all, fill = TRUE, ignore.attr = TRUE)
} else {
sir_logs_all <- do.call(rbind, sir_logs_all)
}
AMR_env$sir_interpretation_history <- rbind_AMR(AMR_env$sir_interpretation_history, sir_logs_all) AMR_env$sir_interpretation_history <- rbind_AMR(AMR_env$sir_interpretation_history, sir_logs_all)
} }
@ -1857,6 +1852,7 @@ sir_interpretation_history <- function(clean = FALSE) {
meet_criteria(clean, allow_class = "logical", has_length = 1) meet_criteria(clean, allow_class = "logical", has_length = 1)
out <- AMR_env$sir_interpretation_history out <- AMR_env$sir_interpretation_history
out$outcome <- as.sir(out$outcome) out$outcome <- as.sir(out$outcome)
out$site <- as.character(out$site)
if (isTRUE(clean)) { if (isTRUE(clean)) {
AMR_env$sir_interpretation_history <- AMR_env$sir_interpretation_history[0, , drop = FALSE] AMR_env$sir_interpretation_history <- AMR_env$sir_interpretation_history[0, , drop = FALSE]
} }

View File

@ -231,9 +231,6 @@ Regarding choice of veterinary guidelines, these might be the best options to se
\if{html}{\out{<div class="sourceCode">}}\preformatted{ options(AMR_guideline = "CLSI") \if{html}{\out{<div class="sourceCode">}}\preformatted{ options(AMR_guideline = "CLSI")
options(AMR_breakpoint_type = "animal") options(AMR_breakpoint_type = "animal")
}\if{html}{\out{</div>}} }\if{html}{\out{</div>}}
\subsection{TODO #187 When applying veterinary breakpoints (by setting \code{host} or by setting \code{breakpoint_type = "animal"}), the \href{https://clsi.org/standards/products/veterinary-medicine/documents/vet09/}{CLSI VET09 guideline} will be applied to cope with missing animal species-specific breakpoints.}{
}
} }
\subsection{After Interpretation}{ \subsection{After Interpretation}{