This is an overview of all the package-specific options()
you can set in the AMR
package.
Options
AMR_breakpoint_type
A character to use inas.sir()
, to indicate which breakpoint type to use. This must be either "ECOFF", "animal", or "human".AMR_cleaning_regex
A regular expression (case-insensitive) to use inas.mo()
and allmo_*
functions, to clean the user input. The default is the outcome ofmo_cleaning_regex()
, which removes texts between brackets and texts such as "species" and "serovar".AMR_custom_ab
A file location to an RDS file, to use custom antimicrobial drugs with this package. This is explained inadd_custom_antimicrobials()
.AMR_custom_mo
A file location to an RDS file, to use custom microorganisms with this package. This is explained inadd_custom_microorganisms()
.AMR_eucastrules
A character to set the default types of rules foreucast_rules()
function, must be one or more of:"breakpoints"
,"expert"
,"other"
,"custom"
,"all"
, and defaults toc("breakpoints", "expert")
.AMR_guideline
A character to set the default guideline for interpreting MIC values and disk diffusion diameters withas.sir()
. Can be only the guideline name (e.g.,"CLSI"
) or the name with a year (e.g."CLSI 2019"
). The default to the latest implemented EUCAST guideline, currently"EUCAST 2024"
. Supported guideline are currently EUCAST (2011-2024) and CLSI (2011-2024).AMR_ignore_pattern
A regular expression to ignore (i.e., makeNA
) any match given inas.mo()
and allmo_*
functions.AMR_include_PKPD
A logical to use inas.sir()
, to indicate that PK/PD clinical breakpoints must be applied as a last resort - the default isTRUE
.AMR_include_screening
A logical to use inas.sir()
, to indicate that clinical breakpoints for screening are allowed - the default isFALSE
.AMR_keep_synonyms
A logical to use inas.mo()
and allmo_*
functions, to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default isFALSE
.AMR_locale
A character to set the language for theAMR
package, can be one of these supported language names or ISO-639-1 codes: English (en), Chinese (zh), Czech (cs), Danish (da), Dutch (nl), Finnish (fi), French (fr), German (de), Greek (el), Italian (it), Japanese (ja), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Spanish (es), Swedish (sv), Turkish (tr), or Ukrainian (uk). The default is the current system language (if supported, English otherwise).AMR_mo_source
A file location for a manual code list to be used inas.mo()
and allmo_*
functions. This is explained inset_mo_source()
.
Saving Settings Between Sessions
Settings in R are not saved globally and are thus lost when R is exited. You can save your options to your own .Rprofile
file, which is a user-specific file. You can edit it using:
utils::file.edit("~/.Rprofile")
In this file, you can set options such as...
...to add Portuguese language support of antibiotics, and allow PK/PD rules when interpreting MIC values with as.sir()
.
Share Options Within Team
For a more global approach, e.g. within a (data) team, save an options file to a remote file location, such as a shared network drive, and have each user read in this file automatically at start-up. This would work in this way:
Save a plain text file to e.g. "X:/team_folder/R_options.R" and fill it with preferred settings.
For each user, open the
.Rprofile
file usingutils::file.edit("~/.Rprofile")
and put in there:source("X:/team_folder/R_options.R")
Reload R/RStudio and check the settings with
getOption()
, e.g.getOption("AMR_locale")
if you have set that value.
Now the team settings are configured in only one place, and can be maintained there.