# Load required librarieslibrary(AMR)# For AMR data analysis
-library(tidymodels)# For machine learning workflows, and data manipulation (dplyr, tidyr, ...)
-#> ── Attaching packages ────────────────────────────────────── tidymodels 1.3.0 ──
-#> ✔broom 1.0.8 ✔recipes 1.2.1
-#> ✔dials 1.4.0 ✔rsample 1.2.1
-#> ✔dplyr 1.1.4 ✔tibble 3.2.1
-#> ✔ggplot2 3.5.1 ✔tidyr 1.3.1
-#> ✔infer 1.0.7 ✔tune 1.3.0
-#> ✔modeldata 1.4.0 ✔workflows 1.2.0
-#> ✔parsnip 1.3.1 ✔workflowsets 1.1.0
-#> ✔purrr 1.0.4 ✔yardstick 1.3.2
-#> ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
-#> ✖purrr::discard() masks scales::discard()
-#> ✖dplyr::filter() masks stats::filter()
-#> ✖dplyr::lag() masks stats::lag()
-#> ✖recipes::step() masks stats::step()
-
-# Your data could look like this:
+library(tidymodels)# For machine learning workflows, and data manipulation (dplyr, tidyr, ...)
+
Prepare the data:
+
+# Your data could look like this:example_isolates#> # A tibble: 2,000 × 46#> date patient age gender ward mo PEN OXA FLC AMX
@@ -215,7 +202,7 @@ three steps: preprocessing, model specification, and fitting.
1. Preprocessing with a Recipe
We create a recipe to preprocess the data for modelling.
-
+
# Define the recipe for data preprocessingresistance_recipe<-recipe(mo~., data =data)%>%step_corr(c(aminoglycosides(), betalactams()), threshold =0.9)
@@ -233,7 +220,7 @@ three steps: preprocessing, model specification, and fitting.
For a recipe that includes at least one preprocessing operation, like
we have with step_corr(), the necessary parameters can be
estimated from a training set using prep():
-
+
prep(resistance_recipe)#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
@@ -277,7 +264,7 @@ much with existing, other variables.
We define a logistic regression model since resistance prediction is
a binary classification task.
-
+
# Specify a logistic regression modellogistic_model<-logistic_reg()%>%set_engine("glm")# Use the Generalised Linear Model engine
@@ -300,7 +287,7 @@ engine.
We bundle the recipe and model together into a workflow,
which organises the entire modeling process.
-
+
# Combine the recipe and model into a workflowresistance_workflow<-workflow()%>%add_recipe(resistance_recipe)%>%# Add the preprocessing recipe
@@ -328,7 +315,7 @@ which organises the entire modeling process.
To train the model, we split the data into training and testing sets.
Then, we fit the workflow on the training set and evaluate its
performance.
-
+
# Split data into training and testing setsset.seed(123)# For reproducibilitydata_split<-initial_split(data, prop =0.8)# 80% training, 20% testing
@@ -350,7 +337,7 @@ testing sets.
functions are internally called again. For training, these functions are
called since they are stored in the recipe.
Next, we evaluate the model on the testing data.
-
+
# Make predictions on the testing setpredictions<-fitted_workflow%>%predict(testing_data)# Generate predictions
@@ -417,7 +404,7 @@ kappa.
It appears we can predict the Gram stain with a 99.5% accuracy based
on AMR results of only aminoglycosides and beta-lactam antibiotics. The
ROC curve looks like this:
Explanation: - mo_name(mo): Converts
-microbial codes into proper species names. - resistance():
-Converts AMR results into numeric values (proportion of resistant
-isolates). - group_by(year, ward, species): Aggregates
-resistance rates by year and ward.
+
Explanation:
+
+
+mo_name(mo): Converts microbial codes into proper
+species names.
+
+resistance(): Converts AMR results into numeric values
+(proportion of resistant isolates).
+
+group_by(year, ward, species): Aggregates resistance
+rates by year and ward.
+
@@ -514,7 +508,7 @@ preprocessing step, a model specification, and the fitting process.
1. Preprocessing with a Recipe
-
+
# Define the reciperesistance_recipe_time<-recipe(res_AMX~year+gramstain, data =data_time)%>%step_dummy(gramstain, one_hot =TRUE)%>%# Convert categorical to numerical
@@ -534,17 +528,23 @@ preprocessing step, a model specification, and the fitting process.
#> • Dummy variables from: gramstain#> • Centering and scaling for: year#> • Sparse, unbalanced variable filter on: all_predictors()
We use a linear regression model to predict resistance trends.
-
+
# Define the linear regression modellm_model<-linear_reg()%>%set_engine("lm")# Use linear regression
@@ -553,15 +553,20 @@ variance predictors.
#> Linear Regression Model Specification (regression)#> #> Computational engine: lm
-
Explanation: - linear_reg(): Defines a
-linear regression model. - set_engine("lm"): Uses R’s
-built-in linear regression engine.
+
Explanation:
+
+
+linear_reg(): Defines a linear regression model.
+
+set_engine("lm"): Uses R’s built-in linear regression
+engine.
+
3. Building the Workflow
We combine the preprocessing recipe and model into a workflow.
We split the data into training and testing sets, fit the model, and
evaluate performance.
-
+
# Split the dataset.seed(123)data_split_time<-initial_split(data_time, prop =0.8)
@@ -618,17 +623,25 @@ evaluate performance.
#> 1 rmse standard 0.0774#> 2 rsq standard 0.711 #> 3 mae standard 0.0704
-
Explanation: - initial_split(): Splits
-data into training and testing sets. - fit(): Trains the
-workflow. - predict(): Generates resistance predictions. -
-metrics(): Evaluates model performance.
+
Explanation:
+
+
+initial_split(): Splits data into training and testing
+sets.
(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.)
-
A New Milestone: AMR v3.0 with One Health Support (= Human + Veterinary + Environmental)
+
A New Milestone: AMR v3.0 with One Health Support (= Human + Veterinary + Environmental)
This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the University of Prince Edward Island’s Atlantic Veterinary College, Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.
-
Breaking
+
Breaking
Dataset antibiotics has been renamed to antimicrobials as the data set contains more than just antibiotics. Using antibiotics will still work, but now returns a warning.
Removed all functions and references that used the deprecated rsi class, which were all replaced with their sir equivalents over two years ago.
Function as.sir() now has extensive support for veterinary breakpoints from CLSI. Use breakpoint_type = "animal" and set the host argument to a variable that contains animal species names.
@@ -116,7 +116,7 @@
-
Changed
+
Changed
SIR interpretation
It is now possible to use column names for argument ab, mo, and uti: as.sir(..., ab = "column1", mo = "column2", uti = "column3"). This greatly improves the flexibility for users.
Users can now set their own criteria (using regular expressions) as to what should be considered S, I, R, SDD, and NI.
@@ -195,7 +195,7 @@
Added console colours support of sir class for Positron
-
Other
+
Other
Added Dr. Larisse Bolton and Aislinn Cook as contributors for their fantastic implementation of WISCA in a mathematically solid way
Added Matthew Saab, Dr. Jordan Stull, and Prof. Javier Sanchez as contributors for their tremendous input on veterinary breakpoints and interpretations
Added Prof. Kat Holt, Dr. Jane Hawkey, and Dr. Natacha Couto as contributors for their many suggestions, ideas and bugfixes
@@ -204,7 +204,7 @@
Stopped support for SAS (.xpt) files, since their file structure and extremely inefficient and requires more disk space than GitHub allows in a single commit.
-
Older Versions
+
Older Versions
This changelog only contains changes from AMR v3.0 (March 2025) and later.
Any (vector of) text that can be coerced to a valid antibiotic drug code with as.ab()
+
Any (vector of) text that can be coerced to a valid antibiotic drug code with as.ab().
language
@@ -104,19 +104,19 @@
...
-
In case of set_ab_names() and data is a data.frame: columns to select (supports tidy selection such as column1:column4), otherwise other arguments passed on to as.ab()
+
In case of set_ab_names() and data is a data.frame: columns to select (supports tidy selection such as column1:column4), otherwise other arguments passed on to as.ab().
only_first
-
A logical to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)
+
A logical to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group).
A logical to indicate whether missing values should be removed
+
A logical to indicate whether missing values should be removed.
diff --git a/reference/antibiogram.html b/reference/antibiogram.html
index 67c94381f..d7425af9b 100644
--- a/reference/antibiogram.html
+++ b/reference/antibiogram.html
@@ -9,7 +9,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -101,11 +101,11 @@ Adhering to previously described approaches (see Source) and especially the Baye
x
-
A data.frame containing at least a column with microorganisms and columns with antimicrobial results (class 'sir', see as.sir())
+
A data.frame containing at least a column with microorganisms and columns with antimicrobial results (class 'sir', see as.sir()).
antimicrobials
-
A vector specifying the antimicrobials to include in the antibiogram (see Examples). Will be evaluated using guess_ab_col(). This can be:
Any antimicrobial name or code
+
A vector specifying the antimicrobials to include in the antibiogram (see Examples). Will be evaluated using guess_ab_col(). This can be:.
A logical to indicate whether only columns of class sir must be selected (default is FALSE), see as.sir()
+
A logical to indicate whether only columns of class sir must be selected (default is FALSE), see as.sir().
only_treatable
-
A logical to indicate whether antimicrobial drugs should be excluded that are only for laboratory tests (default is TRUE), such as gentamicin-high (GEH) and imipenem/EDTA (IPE)
+
A logical to indicate whether antimicrobial drugs should be excluded that are only for laboratory tests (default is TRUE), such as gentamicin-high (GEH) and imipenem/EDTA (IPE).
Language to translate text like "no growth", which defaults to the system language (see get_AMR_locale())
+
Language to translate text like "no growth", which defaults to the system language (see get_AMR_locale()).
info
@@ -128,7 +128,7 @@
...
-
Other arguments passed on to functions
+
Other arguments passed on to functions.
diff --git a/reference/as.sir.html b/reference/as.sir.html
index 1a8e9f67d..8c91d071d 100644
--- a/reference/as.sir.html
+++ b/reference/as.sir.html
@@ -21,7 +21,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -136,7 +136,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
x
-
Vector of values (for class mic: MIC values in mg/L, for class disk: a disk diffusion radius in millimetres)
+
Vector of values (for class mic: MIC values in mg/L, for class disk: a disk diffusion radius in millimetres).
...
@@ -144,7 +144,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
threshold
-
Maximum fraction of invalid antimicrobial interpretations of x, see Examples
+
Maximum fraction of invalid antimicrobial interpretations of x, see Examples.
S, I, R, NI, SDD
@@ -152,15 +152,15 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
A vector (or column name) with characters that can be coerced to valid microorganism codes with as.mo(), can be left empty to determine it automatically
+
A vector (or column name) with characters that can be coerced to valid microorganism codes with as.mo(), can be left empty to determine it automatically.
ab
-
A vector (or column name) with characters that can be coerced to a valid antimicrobial drug code with as.ab()
+
A vector (or column name) with characters that can be coerced to a valid antimicrobial drug code with as.ab().
guideline
@@ -172,7 +172,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
capped_mic_handling
-
A character string that controls how MIC values with a cap (i.e., starting with <, <=, >, or >=) are interpreted. Supports the following options:
+
A character string that controls how MIC values with a cap (i.e., starting with <, <=, >, or >=) are interpreted. Supports the following options:.
"none"
<= and >= are treated as-is.
< and > are treated as-is.
"conservative"
<= and >= return "NI" (non-interpretable) if the MIC is within the breakpoint guideline range.
@@ -217,7 +217,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
conserve_capped_values
-
Deprecated, use capped_mic_handling instead
+
Deprecated, use capped_mic_handling instead.
col_mo
@@ -225,7 +225,7 @@ All breakpoints used for interpretation are available in our clinical_breakpoint
clean
-
A logical to indicate whether previously stored results should be forgotten after returning the 'logbook' with results
+
A logical to indicate whether previously stored results should be forgotten after returning the 'logbook' with results.
@@ -820,16 +820,16 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
#># A tibble: 65 × 16#> datetime index ab_given mo_given host_given ab mo #><dttm><int><chr><chr><chr><ab><mo>
-#> 1 2025-03-31 08:58:25 1 ampicillin Strep p… human AMP B_STRPT_PNMN
-#> 2 2025-03-31 08:58:25 1 AMP Escheri… human AMP B_[ORD]_ENTRBC…
-#> 3 2025-03-31 08:58:25 1 AMP Escheri… human AMP B_[ORD]_ENTRBC…
+#> 1 2025-03-31 13:01:25 1 ampicillin Strep p… human AMP B_STRPT_PNMN
+#> 2 2025-03-31 13:01:25 1 AMP Escheri… human AMP B_[ORD]_ENTRBC…
+#> 3 2025-03-31 13:01:25 1 AMP Escheri… human AMP B_[ORD]_ENTRBC…#> 4NANANANANANA NA
-#> 5 2025-03-31 08:58:26 1 GEN Escheri… human GEN B_[ORD]_ENTRBC…
-#> 6 2025-03-31 08:58:26 1 TOB Escheri… human TOB B_[ORD]_ENTRBC…
-#> 7 2025-03-31 08:58:27 1 AMX B_STRPT… human AMX B_STRPT_PNMN
-#> 8 2025-03-31 08:58:27 1 AMX B_STRPT… human AMX B_STRPT_PNMN
-#> 9 2025-03-31 08:58:27 2 AMX B_STRPT… human AMX B_STRPT_PNMN
-#>10 2025-03-31 08:58:27 3 AMX B_STRPT… human AMX B_STRPT_PNMN
+#> 5 2025-03-31 13:01:25 1 GEN Escheri… human GEN B_[ORD]_ENTRBC…
+#> 6 2025-03-31 13:01:26 1 TOB Escheri… human TOB B_[ORD]_ENTRBC…
+#> 7 2025-03-31 13:01:26 1 AMX B_STRPT… human AMX B_STRPT_PNMN
+#> 8 2025-03-31 13:01:26 1 AMX B_STRPT… human AMX B_STRPT_PNMN
+#> 9 2025-03-31 13:01:26 2 AMX B_STRPT… human AMX B_STRPT_PNMN
+#>10 2025-03-31 13:01:26 3 AMX B_STRPT… human AMX B_STRPT_PNMN #># ℹ 55 more rows#># ℹ 9 more variables: host <chr>, method <chr>, input <chr>, outcome <sir>,#># notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
diff --git a/reference/atc_online.html b/reference/atc_online.html
index 8cc3b572d..1832268a1 100644
--- a/reference/atc_online.html
+++ b/reference/atc_online.html
@@ -7,7 +7,7 @@
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -75,7 +75,7 @@
atc_code
-
A character (vector) with ATC code(s) of antimicrobials, will be coerced with as.ab() and ab_atc() internally if not a valid ATC code
+
A character (vector) with ATC code(s) of antimicrobials, will be coerced with as.ab() and ab_atc() internally if not a valid ATC code.
property
@@ -83,7 +83,7 @@
administration
-
Type of administration when using property = "Adm.R", see Details
+
Type of administration when using property = "Adm.R", see Details.
A logical to indicate whether values S, SDD, and I should be summed, so resistance will be based on only R - the default is TRUE
+
A logical to indicate whether values S, SDD, and I should be summed, so resistance will be based on only R - the default is TRUE.
add_ab_group
-
A logical to indicate where the group of the antimicrobials must be included as a first column
+
A logical to indicate where the group of the antimicrobials must be included as a first column.
remove_intrinsic_resistant
-
logical to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table
+
logical to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table.
decimal.mark
diff --git a/reference/clinical_breakpoints.html b/reference/clinical_breakpoints.html
index a9eca6985..6f420bd3f 100644
--- a/reference/clinical_breakpoints.html
+++ b/reference/clinical_breakpoints.html
@@ -21,7 +21,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values.">AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/count.html b/reference/count.html
index 3a3316ea4..712eac02e 100644
--- a/reference/count.html
+++ b/reference/count.html
@@ -9,7 +9,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -89,15 +89,15 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
only_all_tested
-
(for combination therapies, i.e. using more than one variable for ...): a logical to indicate that isolates must be tested for all antimicrobials, see section Combination Therapy below
+
(for combination therapies, i.e. using more than one variable for ...): a logical to indicate that isolates must be tested for all antimicrobials, see section Combination Therapy below.
A column name of the antimicrobials data set to translate the antibiotic abbreviations to, using ab_property()
+
A column name of the antimicrobials data set to translate the antibiotic abbreviations to, using ab_property().
language
@@ -105,7 +105,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
combine_SI
-
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is TRUE
+
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is TRUE.
Rules in formula notation, see below for instructions, and in Examples
+
Rules in formula notation, see below for instructions, and in Examples.
diff --git a/reference/dosage.html b/reference/dosage.html
index badc742a1..faf084e41 100644
--- a/reference/dosage.html
+++ b/reference/dosage.html
@@ -7,7 +7,7 @@
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/eucast_rules.html b/reference/eucast_rules.html
index 7e60bc2f9..d58a70f9b 100644
--- a/reference/eucast_rules.html
+++ b/reference/eucast_rules.html
@@ -9,7 +9,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -86,7 +86,7 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test
x
-
A data set with antimicrobials columns, such as amox, AMX and AMC
+
A data set with antimicrobials columns, such as amox, AMX and AMC.
col_mo
@@ -94,7 +94,7 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test
info
-
A logical to indicate whether progress should be printed to the console - the default is only print while in interactive sessions
+
A logical to indicate whether progress should be printed to the console - the default is only print while in interactive sessions.
rules
@@ -122,27 +122,27 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test
only_sir_columns
-
A logical to indicate whether only antimicrobial columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE)
+
A logical to indicate whether only antimicrobial columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE).
A logical indicating whether to overwrite non-NA values (default: FALSE). When FALSE, only NA values are modified. To ensure compliance with EUCAST guidelines, this should remainFALSE, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant."
+
A logical indicating whether to overwrite non-NA values (default: FALSE). When FALSE, only NA values are modified. To ensure compliance with EUCAST guidelines, this should remainFALSE, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant.".
...
-
Column name of an antimicrobial, see section Antimicrobials below
+
Column name of an antimicrobial, see section Antimicrobials below.
ab
-
Any (vector of) text that can be coerced to a valid antimicrobial drug code with as.ab()
+
Any (vector of) text that can be coerced to a valid antimicrobial drug code with as.ab().
administration
-
Route of administration, either "im", "iv", or "oral"
+
Route of administration, either "im", "iv", or "oral".
Column name of the result date (or date that is was received on the lab) - the default is the first column with a date class
+
Column name of the result date (or date that is was received on the lab) - the default is the first column with a date class.
col_patient_id
-
Column name of the unique IDs of the patients - the default is the first column that starts with 'patient' or 'patid' (case insensitive)
+
Column name of the unique IDs of the patients - the default is the first column that starts with 'patient' or 'patid' (case insensitive).
col_mo
@@ -102,7 +102,7 @@
col_specimen
-
Column name of the specimen type or group
+
Column name of the specimen type or group.
col_icu
@@ -118,19 +118,19 @@
testcodes_exclude
-
A character vector with test codes that should be excluded (case-insensitive)
+
A character vector with test codes that should be excluded (case-insensitive).
icu_exclude
-
A logical to indicate whether ICU isolates should be excluded (rows with value TRUE in the column set with col_icu)
+
A logical to indicate whether ICU isolates should be excluded (rows with value TRUE in the column set with col_icu).
specimen_group
-
Value in the column set with col_specimen to filter on
+
Value in the column set with col_specimen to filter on.
type
-
Type to determine weighed isolates; can be "keyantimicrobials" or "points", see Details
+
Type to determine weighed isolates; can be "keyantimicrobials" or "points", see Details.
method
@@ -138,15 +138,15 @@
ignore_I
-
logical to indicate whether antibiotic interpretations with "I" will be ignored when type = "keyantimicrobials", see Details
+
logical to indicate whether antibiotic interpretations with "I" will be ignored when type = "keyantimicrobials", see Details.
points_threshold
-
Minimum number of points to require before differences in the antibiogram will lead to inclusion of an isolate when type = "points", see Details
+
Minimum number of points to require before differences in the antibiogram will lead to inclusion of an isolate when type = "points", see Details.
info
-
A logical to indicate info should be printed - the default is TRUE only in interactive mode
+
A logical to indicate info should be printed - the default is TRUE only in interactive mode.
include_unknown
@@ -158,7 +158,7 @@
...
-
Arguments passed on to first_isolate() when using filter_first_isolate(), otherwise arguments passed on to key_antimicrobials() (such as universal, gram_negative, gram_positive)
+
Arguments passed on to first_isolate() when using filter_first_isolate(), otherwise arguments passed on to key_antimicrobials() (such as universal, gram_negative, gram_positive).
A numeric vector of length two providing limits of the scale, use NA to refer to the existing minimum or maximum
+
A numeric vector of length two providing limits of the scale, use NA to refer to the existing minimum or maximum.
translate_ab
-
A column name of the antimicrobials data set to translate the antibiotic abbreviations to, using ab_property()
+
A column name of the antimicrobials data set to translate the antibiotic abbreviations to, using ab_property().
combine_SI
-
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is TRUE
+
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the output only consists of S+SDD+I vs. R (susceptible vs. resistant) - the default is TRUE.
A text to search x for, will be checked with as.ab() if this value is not a column in x
+
A text to search x for, will be checked with as.ab() if this value is not a column in x.
verbose
-
A logical to indicate whether additional info should be printed
+
A logical to indicate whether additional info should be printed.
only_sir_columns
-
A logical to indicate whether only antibiotic columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE)
+
A logical to indicate whether only antibiotic columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE).
A variable to join by - if left empty will search for a column with class mo (created with as.mo()) or will be "mo" if that column name exists in x, could otherwise be a column name of x with values that exist in microorganisms$mo (such as by = "bacteria_id"), or another column in microorganisms (but then it should be named, like by = c("bacteria_id" = "fullname"))
+
A variable to join by - if left empty will search for a column with class mo (created with as.mo()) or will be "mo" if that column name exists in x, could otherwise be a column name of x with values that exist in microorganisms$mo (such as by = "bacteria_id"), or another column in microorganisms (but then it should be named, like by = c("bacteria_id" = "fullname")).
suffix
@@ -85,7 +85,7 @@
...
-
Ignored, only in place to allow future extensions
+
Ignored, only in place to allow future extensions.
logical values, or a column name containing logical values, indicating the presence of an ESBL gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of an ESBL gene (or production of its proteins).
carbapenemase
-
logical values, or a column name containing logical values, indicating the presence of a carbapenemase gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of a carbapenemase gene (or production of its proteins).
mecA
-
logical values, or a column name containing logical values, indicating the presence of a mecA gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of a mecA gene (or production of its proteins).
mecC
-
logical values, or a column name containing logical values, indicating the presence of a mecC gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of a mecC gene (or production of its proteins).
vanA
-
logical values, or a column name containing logical values, indicating the presence of a vanA gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of a vanA gene (or production of its proteins).
vanB
-
logical values, or a column name containing logical values, indicating the presence of a vanB gene (or production of its proteins)
+
logical values, or a column name containing logical values, indicating the presence of a vanB gene (or production of its proteins).
info
-
A logical to indicate whether progress should be printed to the console - the default is only print while in interactive sessions
+
A logical to indicate whether progress should be printed to the console - the default is only print while in interactive sessions.
pct_required_classes
@@ -135,7 +135,7 @@
only_sir_columns
-
A logical to indicate whether only antimicrobial columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE)
+
A logical to indicate whether only antimicrobial columns must be detected that were transformed to class sir (see as.sir()) on beforehand (default is FALSE).
...
@@ -143,7 +143,7 @@
as_factor
-
A logical to indicate whether the returned value should be an ordered factor (TRUE, default), or otherwise a character vector
+
A logical to indicate whether the returned value should be an ordered factor (TRUE, default), or otherwise a character vector.
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is TRUE
+
A logical to indicate whether all values of S, SDD, and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is TRUE.
amr_distance
-
The outcome of mean_amr_distance()
+
The outcome of mean_amr_distance().
row
-
An index, such as a row number
+
An index, such as a row number.
diff --git a/reference/microorganisms.codes.html b/reference/microorganisms.codes.html
index 68dc2387e..be89758b8 100644
--- a/reference/microorganisms.codes.html
+++ b/reference/microorganisms.codes.html
@@ -7,7 +7,7 @@
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/microorganisms.groups.html b/reference/microorganisms.groups.html
index 6765a3657..eeaaee2f3 100644
--- a/reference/microorganisms.groups.html
+++ b/reference/microorganisms.groups.html
@@ -7,7 +7,7 @@
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/microorganisms.html b/reference/microorganisms.html
index ffca3c980..6194c7bbd 100644
--- a/reference/microorganisms.html
+++ b/reference/microorganisms.html
@@ -9,7 +9,7 @@ This data set is carefully crafted, yet made 100% reproducible from public and a
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/mo_matching_score.html b/reference/mo_matching_score.html
index d36b4665e..db01c5db1 100644
--- a/reference/mo_matching_score.html
+++ b/reference/mo_matching_score.html
@@ -7,7 +7,7 @@
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
@@ -63,11 +63,11 @@
One of the column names of the microorganisms data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed", or must be "shortname"
+
One of the column names of the microorganisms data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed", or must be "shortname".
diff --git a/reference/mo_source.html b/reference/mo_source.html
index 1d1bcd74a..be7c61e1d 100644
--- a/reference/mo_source.html
+++ b/reference/mo_source.html
@@ -9,7 +9,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
AMR (for R)
- 2.1.1.9232
+ 2.1.1.9233
diff --git a/reference/pca-2.png b/reference/pca-2.png
index 16592a7a117bc71d45da334bed8088dfd79db8be..7f58fd8f75bb2d2696102d416adecd1c15b5b4ea 100644
GIT binary patch
literal 88081
zcmeFXXHb+;6D~LmFr*<#8iM2~X#mMNC?HW#$vKH+kep^DOGZh81VJzm1<7H^NEQ%~
zIAoDDfaG*vKK*v@-r67gYpeFwo`QO--kEcz`*ioyPxm=7y4tG5gmi=;5Qtb^O+^m`
z!u11zu&wbSz?+%0d<^h_SZk=N08e0?DmR7#4+3{JBQFr>cGS&3R^sZO9SFn>Qdd!Y
zYrkZ#iVtKRbCf+8J?K2<~)ZJ%T|}GNQe1mnV3IO-kokQs)r`
z-Iu~jfe#@>j@$X>rNf4%)Wl;w?<%@FLwuc>&Sm_oA|lni~RtfI8&
ze+96AG(HWuqkdU%aCo=7E@W$}GWX`K`VSWQ5nQ!VkQDWaW}L^M0u8JB
z&|)6^eXW-&j86SKukel?iud2V$9?}_UieW+9?{4S@2!pwFW7vVgKgTw^cC(@VX?Tf
z)j_t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