bug_drug_combinations.Rd
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format
on the result to prettify it to a publicable/printable format, see Examples.
bug_drug_combinations(x, col_mo = NULL, minimum = 30, FUN = mo_shortname, ...) # S3 method for bug_drug_combinations format(x, translate_ab = "name (ab, atc)", language = get_locale(), minimum = 30, combine_SI = TRUE, combine_IR = FALSE, add_ab_group = TRUE, remove_intrinsic_resistant = FALSE, decimal.mark = getOption("OutDec"), big.mark = ifelse(decimal.mark == ",", ".", ","), ...)
x | data with antibiotic columns, like e.g. |
---|---|
col_mo | column name of the IDs of the microorganisms (see |
minimum | the minimum allowed number of available (tested) isolates. Any isolate count lower than |
FUN | the function to call on the |
... | arguments passed on to |
translate_ab | a character of length 1 containing column names of the |
language | language of the returned text, defaults to system language (see |
combine_SI | a logical to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the parameter |
combine_IR | logical to indicate whether values R and I should be summed |
add_ab_group | logical to indicate where the group of the antimicrobials must be included as a first column |
remove_intrinsic_resistant | logical to indicate that rows with 100% resistance for all tested antimicrobials must be removed from the table |
decimal.mark | the character to be used to indicate the numeric decimal point. |
big.mark | character; if not empty used as mark between every
|
M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition, 2014, Clinical and Laboratory Standards Institute (CLSI). https://clsi.org/standards/products/microbiology/documents/m39/.
The function format
calculates the resistance per bug-drug combination. Use combine_IR = FALSE
(default) to test R vs. S+I and combine_IR = TRUE
to test R+I vs. S.
The language of the output can be overwritten with options(AMR_locale)
, please see translate.
On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
# \donttest{ x <- bug_drug_combinations(example_isolates) x format(x) # Use FUN to change to transformation of microorganism codes x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain) x <- bug_drug_combinations(example_isolates, FUN = function(x) ifelse(x == "B_ESCHR_COLI", "E. coli", "Others")) # }