(v2.1.1.9223) allow + ab

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2025-03-20 22:56:32 +01:00
1 parent d147d6602d
commit bb110646db
10 files changed
+43 -30

No files matched your search

+17 -20
View File
@@ -73,26 +73,23 @@ if not isinstalled('AMR', lib_loc=r_lib_path):
print(f"AMR: Installing latest AMR R package to {r_lib_path}...", flush=True)
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
# Retrieve Python AMR version
try:
python_amr_version = metadata.version('AMR')
except metadata.PackageNotFoundError:
python_amr_version = ''
# Retrieve R AMR version
r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))')
r_amr_version = str(r_amr_version[0])
print(python_amr_version)
print(r_amr_version)
# Compare R and Python package versions
if r_amr_version != python_amr_version:
try:
print(f"AMR: Updating AMR package in {r_lib_path}...", flush=True)
utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
except Exception as e:
print(f"AMR: Could not update: {e}", flush=True)
# # Retrieve Python AMR version
# try:
# python_amr_version = metadata.version('AMR')
# except metadata.PackageNotFoundError:
# python_amr_version = ''
#
# # Retrieve R AMR version
# r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))')
# r_amr_version = str(r_amr_version[0])
#
# # Compare R and Python package versions
# if r_amr_version != python_amr_version:
# try:
# print(f"AMR: Updating AMR package in {r_lib_path}...", flush=True)
# utils.install_packages('AMR', repos='https://msberends.r-universe.dev', quiet=True)
# except Exception as e:
# print(f"AMR: Could not update: {e}", flush=True)
print(f"AMR: Setting up R environment and AMR datasets...", flush=True)
@@ -1,6 +1,6 @@
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
First and foremost, you are trained on version 2.1.1.9222. Remember this whenever someone asks which AMR package version you’re at.
First and foremost, you are trained on version 2.1.1.9223. Remember this whenever someone asks which AMR package version you’re at.
Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens.
----------------------------------------------------------------------------------------------------
@@ -13,6 +13,7 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'NAMESPACE':
S3method("!=",amr_selector)
S3method("&",amr_selector)
S3method("+",ab)
S3method("+",amr_selector)
S3method("==",amr_selector)
S3method("[",ab)
@@ -1713,8 +1714,9 @@ retrieve_wisca_parameters(wisca_model, ...)
}
\item Combination therapy, indicated by using \code{"+"}, with or without \link[=antimicrobial_selectors]{antimicrobial selectors}, e.g.:
\itemize{
\item \code{"TZP+TOB"}
\item \code{"cipro + genta"}
\item \code{"TZP+TOB"}
\item \code{c("TZP", "TZP+GEN", "TZP+TOB")}
\item \code{carbapenems() + "GEN"}
\item \code{carbapenems() + c("", "GEN")}
\item \code{carbapenems() + c("", aminoglycosides())}