1
0
mirror of https://github.com/msberends/AMR.git synced 2026-07-18 01:11:06 +02:00
This commit is contained in:
2026-06-23 01:20:09 +02:00
parent 57e45db320
commit f0c3ce80cd
14 changed files with 95 additions and 82 deletions

View File

@@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 3.0.1.9059 Version: 3.0.1.9059
Date: 2026-05-06 Date: 2026-06-23
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)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by

View File

@@ -51,6 +51,7 @@ Planned as v3.1.0, end of June 2026.
* Improved console messages with clickable links throughout, powered by `cli` if it is installed (#191, #265) * Improved console messages with clickable links throughout, powered by `cli` if it is installed (#191, #265)
* `as.disk()`: input validation is now more strict, rejecting values that are not recognisable as a numeric disk zone diameter * `as.disk()`: input validation is now more strict, rejecting values that are not recognisable as a numeric disk zone diameter
# AMR 3.0.1 # AMR 3.0.1
This is a bugfix release following the release of v3.0.0 in June 2025. This is a bugfix release following the release of v3.0.0 in June 2025.

View File

@@ -113,7 +113,7 @@ TAXONOMY_VERSION <- list(
LPSN = list( LPSN = list(
name = "List of Prokaryotic names with Standing in Nomenclature (LPSN)", name = "List of Prokaryotic names with Standing in Nomenclature (LPSN)",
accessed_date = as.Date("2026-05-07"), accessed_date = as.Date("2026-05-07"),
citation = "Freese, HM *et al.* (2026). **TYGS and LPSN in 2025: a Global Core Biodata Resource for genome-based classification and nomenclature of prokaryotes within DSMZ Digital Diversity.** Nucleic Acids Research, 54, D884D891; \\doi{10.1093/nar/gkaf1110}.", citation = "Freese, HM *et al.* (2026). **TYGS and LPSN in 2025: a Global Core Biodata Resource for genome-based classification and nomenclature of prokaryotes within DSMZ Digital Diversity.** Nucleic Acids Research, 54, D884\u2013D891; \\doi{10.1093/nar/gkaf1110}.",
url = "https://lpsn.dsmz.de" url = "https://lpsn.dsmz.de"
), ),
MycoBank = list( MycoBank = list(
@@ -149,10 +149,13 @@ TAXONOMY_VERSION <- list(
) )
globalVariables(c( globalVariables(c(
".coverage",
".GenericCallEnv", ".GenericCallEnv",
".lower",
".mo", ".mo",
".rowid", ".rowid",
".syndromic_group", ".syndromic_group",
".upper",
"ab", "ab",
"ab_txt", "ab_txt",
"affect_ab_name", "affect_ab_name",
@@ -188,6 +191,7 @@ globalVariables(c(
"hjust", "hjust",
"host_index", "host_index",
"host_match", "host_match",
"incidence",
"input", "input",
"input_given", "input_given",
"intrinsic_resistant", "intrinsic_resistant",
@@ -215,6 +219,7 @@ globalVariables(c(
"old", "old",
"old_name", "old_name",
"p_susceptible", "p_susceptible",
"pathogen",
"pattern", "pattern",
"R", "R",
"rank_index", "rank_index",

View File

@@ -898,7 +898,7 @@ antibiogram.default <- function(x,
susceptibility = sim_susceptibility susceptibility = sim_susceptibility
) )
out_wisca$coverage[out_wisca$group == group] <- mean(sim_coverage) out_wisca$coverage[out_wisca$group == group] <- mean(sim_coverage)
ci_vals <- unname(stats::quantile(coverage_simulations, probs = probs)) ci_vals <- unname(stats::quantile(sim_coverage, probs = probs))
out_wisca$lower_ci[out_wisca$group == group] <- ci_vals[1] out_wisca$lower_ci[out_wisca$group == group] <- ci_vals[1]
out_wisca$upper_ci[out_wisca$group == group] <- ci_vals[2] out_wisca$upper_ci[out_wisca$group == group] <- ci_vals[2]
} }
@@ -1657,10 +1657,10 @@ autoplot.antibiogram <- function(object,
if (is.null(caption)) { if (is.null(caption)) {
if (is_wisca) { if (is_wisca) {
out <- out + labs(caption = "Overlapping credible intervals:\nclinically non-inferior (Bielicki 2020)") out <- out + ggplot2::labs(caption = "Overlapping credible intervals:\nclinically non-inferior (Bielicki 2020)")
} }
} else if (!caption %in% c(FALSE, NA)) { } else if (!caption %in% c(FALSE, NA)) {
out <- out + labs(caption = caption) out <- out + ggplot2::labs(caption = caption)
} }
out <- out + out <- out +

View File

@@ -46,7 +46,7 @@
#' #'
#' The short name ([mo_shortname()]) returns the first character of the genus and the full species, such as `"E. coli"`, for species and subspecies. Exceptions are abbreviations of staphylococci (such as *"CoNS"*, Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as *"GBS"*, Group B Streptococci). Please bear in mind that e.g. *E. coli* could mean *Escherichia coli* (kingdom of Bacteria) as well as *Entamoeba coli* (kingdom of Protozoa). Returning to the full name will be done using [as.mo()] internally, giving priority to bacteria and human pathogens, i.e. `"E. coli"` will always be considered *Escherichia coli*. As a result, `mo_fullname(mo_shortname("Entamoeba coli"))` returns `"Escherichia coli"`. #' The short name ([mo_shortname()]) returns the first character of the genus and the full species, such as `"E. coli"`, for species and subspecies. Exceptions are abbreviations of staphylococci (such as *"CoNS"*, Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as *"GBS"*, Group B Streptococci). Please bear in mind that e.g. *E. coli* could mean *Escherichia coli* (kingdom of Bacteria) as well as *Entamoeba coli* (kingdom of Protozoa). Returning to the full name will be done using [as.mo()] internally, giving priority to bacteria and human pathogens, i.e. `"E. coli"` will always be considered *Escherichia coli*. As a result, `mo_fullname(mo_shortname("Entamoeba coli"))` returns `"Escherichia coli"`.
#' #'
#' Following the formal introduction of the new kingdom rank into prokaryotic nomenclature by G\u00f6ker and Oren (2024, \doi{10.1099/ijsem.0.006242}), [mo_kingdom()] and [mo_domain()] return different results for bacteria and archaea: [mo_kingdom()] returns the new formal kingdom (e.g. "Pseudomonadati", "Bacillati"), while [mo_domain()] returns the new domain (e.g. "Bacteria", "Archaea"). For non-prokaryotic organisms, both functions return identical results. #' Following the formal introduction of the new kingdom rank into prokaryotic nomenclature by G"{o}ker and Oren (2024, \doi{10.1099/ijsem.0.006242}), [mo_kingdom()] and [mo_domain()] return different results for bacteria and archaea: [mo_kingdom()] returns the new formal kingdom (e.g. "Pseudomonadati", "Bacillati"), while [mo_domain()] returns the new domain (e.g. "Bacteria", "Archaea"). For non-prokaryotic organisms, both functions return identical results.
#' #'
#' Determination of human pathogenicity ([mo_pathogenicity()]) is strongly based on Bartlett *et al.* (2022, \doi{10.1099/mic.0.001269}). This function returns a [factor] with the levels *Pathogenic*, *Potentially pathogenic*, *Non-pathogenic*, and *Unknown*. #' Determination of human pathogenicity ([mo_pathogenicity()]) is strongly based on Bartlett *et al.* (2022, \doi{10.1099/mic.0.001269}). This function returns a [factor] with the levels *Pathogenic*, *Potentially pathogenic*, *Non-pathogenic*, and *Unknown*.
#' #'

Binary file not shown.

View File

@@ -126,7 +126,8 @@ step_mic_log2 <- function(
trained = FALSE, trained = FALSE,
columns = NULL, columns = NULL,
skip = FALSE, skip = FALSE,
id = recipes::rand_id("mic_log2")) { id = recipes::rand_id("mic_log2")
) {
recipes::add_step( recipes::add_step(
recipe, recipe,
step_mic_log2_new( step_mic_log2_new(
@@ -201,7 +202,8 @@ step_sir_numeric <- function(
trained = FALSE, trained = FALSE,
columns = NULL, columns = NULL,
skip = FALSE, skip = FALSE,
id = recipes::rand_id("sir_numeric")) { id = recipes::rand_id("sir_numeric")
) {
recipes::add_step( recipes::add_step(
recipe, recipe,
step_sir_numeric_new( step_sir_numeric_new(

View File

@@ -1444,7 +1444,7 @@ EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella cephalo
EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella aminoglycosides R EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella aminoglycosides R
EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella PEF S CIP S EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella PEF S CIP S
EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella PEF R CIP R EUCAST Expert Rules 3.3 Expert Rules on Salmonella genus is Salmonella PEF R CIP R
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus FOX R AMC, AMP, AMX, APL, APX, ATM, AXS, AZA, AZD, AZL, BAM, BIA, BNB, BNP, CAC, CAR, CAT, CAZ, CCL, CCP, CCV, CCX, CDC, CDR, CEB, CEC, CED, CEM, CEP, CEQ, CFA, CFM, CFM1, CFP, CFR, CFS, CFZ, CHE, CIC, CID, CLM, CLO, CMX, CMZ, CND, CPA, CPC, CPD, CPI, CPL, CPM, CPO, CPR, CPX, CRB, CRD, CRN, CRO, CSE, CSL, CSU, CTA, CTB, CTC, CTF, CTL, CTS, CTT, CTX, CTZ, CXA, CXM, CZA, CZD, CZL, CZO, CZP, CZT, CZX, DIC, DIT, DIX, DIZ, DOR, EPC, ETP, FDC, FEP, FLC, FOV, FOX, FPE, FPT, FPZ, FTA, HAP, HET, IMR, IPM, LEN, LEX, LOR, LTM, MAN, MEC, MEM, MET, MEV, MEZ, MSU, MTM, NAF, OXA, PAN, PEN, PHE, PHN, PIP, PIS, PME, PNM, PNO, PRB, PRC, PRP, PSU, PVM, RIA, RID, RIT, RZM, SAM, SBC, SLT6, SRX, TAL, TAN, TBP, TCC, TEM, TIC, TIO, TMN, TZP, ZO R Betalactams without ceftaroline and ceftobiprole = betalactams()[!betalactams() %in% c("CPT", "BPR")] EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus FOX R AMC, AMP, AMX, APL, APX, ATM, AXS, AZA, AZD, AZL, BAM, BIA, BNB, BNP, CAC, CAR, CAT, CAZ, CCL, CCP, CCV, CCX, CDC, CDR, CEB, CEC, CED, CEM, CEP, CEQ, CFA, CFM, CFM1, CFP, CFR, CFS, CFZ, CHE, CIC, CID, CLM, CLO, CMX, CMZ, CND, CPA, CPC, CPD, CPI, CPL, CPM, CPO, CPR, CPX, CRB, CRD, CRN, CRO, CSE, CSL, CSU, CTA, CTB, CTC, CTF, CTL, CTS, CTT, CTX, CTZ, CXA, CXM, CZA, CZD, CZL, CZO, CZP, CZT, CZX, DIC, DIT, DIX, DIZ, DOR, EPC, ETP, FDC, FEP, FLC, FOV, FOX, FPE, FPT, FPZ, FTA, HAP, HET, IMR, IPM, LEN, LEX, LOR, LTM, MAN, MEC, MEM, MET, MEV, MEZ, MSU, MTM, NAF, OXA, PAN, PEN, PHE, PHN, PIP, PIS, PME, PNM, PNO, PRB, PRC, PRP, PSU, PVM, RIA, RID, RIT, RZM, SAM, SBC, SLT6, SRX, TAL, TAN, TBP, TCC, TEM, TIC, TIO, TMN, TZP, ZOP R Betalactams without ceftaroline and ceftobiprole = betalactams()[!betalactams() %in% c("CPT", "BPR")]
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus FOX S betalactams_with_inhibitor, carbapenems S Must be S to all betactams with recognised anti-staphylococcal activity EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus FOX S betalactams_with_inhibitor, carbapenems S Must be S to all betactams with recognised anti-staphylococcal activity
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus PEN R AMP, AMX, AZL, BAM, CRB, CRN, EPC, HET, MEC, MEZ, MTM, PIP, PME, PVM, SBC, TAL, TEM, TIC R all penicillins without beta-lactamse inhibitor and excluding isoxazolylpenicillines EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus_species is Staphylococcus aureus PEN R AMP, AMX, AZL, BAM, CRB, CRN, EPC, HET, MEC, MEZ, MTM, PIP, PME, PVM, SBC, TAL, TEM, TIC R all penicillins without beta-lactamse inhibitor and excluding isoxazolylpenicillines
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus ERY, CLI S macrolides, lincosamides S EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus ERY, CLI S macrolides, lincosamides S
Can't render this file because it has a wrong number of fields in line 10.

Binary file not shown.

Binary file not shown.

View File

@@ -26,12 +26,9 @@
<div style="display: flex; font-size: 0.8em;"> <div style="display: flex; font-size: 0.8em;">
<p style="text-align:left; width: 50%;"> <p style="text-align:left; width: 50%;">
<small><a href="https://amr-for-r.org/">amr-for-r.org</a></small> <small><a href="https://amr-for-r.org/">amr-for-r.org</a></small>
</p> </p>
<p style="text-align:right; width: 50%;"> <p style="text-align:right; width: 50%;">
<small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small> <small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small>
</p> </p>
@@ -174,24 +171,26 @@ example_isolates %>%
#> Using column mo as input for `mo_fullname()` #> Using column mo as input for `mo_fullname()`
#> Using column mo as input for `mo_is_gram_negative()` #> Using column mo as input for `mo_is_gram_negative()`
#> Using column mo as input for `mo_is_intrinsic_resistant()` #> Using column mo as input for `mo_is_intrinsic_resistant()`
#> Determining intrinsic resistance based on 'EUCAST Expected Resistant #> Determining intrinsic resistance based on 'EUCAST Expected
#> Phenotypes' v1.2 (2023). This note will be shown once per session. #> Resistant Phenotypes' v1.2 (2023). This note will be shown
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK #> once per session.
#> (amikacin), and KAN (kanamycin) #> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem) #> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
#> # A tibble: 35 × 7 #> # A tibble: 35 × 7
#> bacteria GEN TOB AMK KAN IPM MEM #> bacteria GEN TOB AMK KAN IPM MEM
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir> #> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
#> 1 Pseudomonas aeruginosa I S NA R S NA #> 1 Pseudomonas aer I S NA R S NA
#> 2 Pseudomonas aeruginosa I S NA R S NA #> 2 Pseudomonas aer I S NA R S NA
#> 3 Pseudomonas aeruginosa I S NA R S NA #> 3 Pseudomonas aer I S NA R S NA
#> 4 Pseudomonas aeruginosa S S S R NA S #> 4 Pseudomonas aer S S S R NA S
#> 5 Pseudomonas aeruginosa S S S R S S #> 5 Pseudomonas aer S S S R S S
#> 6 Pseudomonas aeruginosa S S S R S S #> 6 Pseudomonas aer S S S R S S
#> 7 Stenotrophomonas maltophilia R R R R R R #> 7 Stenotrophomona R R R R R R
#> 8 Pseudomonas aeruginosa S S S R NA S #> 8 Pseudomonas aer S S S R NA S
#> 9 Pseudomonas aeruginosa S S S R NA S #> 9 Pseudomonas aer S S S R NA S
#> 10 Pseudomonas aeruginosa S S S R S S #> 10 Pseudomonas aer S S S R S S
#> # 25 more rows #> # 25 more rows
``` ```
@@ -215,13 +214,14 @@ output format automatically (such as markdown, LaTeX, HTML, etc.).
``` r ``` r
antibiogram(example_isolates, antibiogram(example_isolates,
antimicrobials = c(aminoglycosides(), carbapenems())) antimicrobials = c(aminoglycosides(), carbapenems()))
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK #> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (amikacin), and KAN (kanamycin) #> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem) #> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
``` ```
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin | | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|:---|:---|:---|:---|:---|:---|:---| |:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) | | CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) | | *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) | | *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
@@ -243,7 +243,7 @@ antibiogram(example_isolates,
``` ```
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin | | Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---| |:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) | | Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) | | Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
@@ -318,16 +318,18 @@ example_isolates %>%
summarise(across(c(GEN, TOB), summarise(across(c(GEN, TOB),
list(total_R = resistance, list(total_R = resistance,
conf_int = function(x) sir_confidence_interval(x, collapse = "-")))) conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
#> `resistance()` assumes the EUCAST guideline and thus considers the 'I' #> `resistance()` assumes the EUCAST guideline and thus
#> category susceptible. Set the `guideline` argument or the `AMR_guideline` #> considers the 'I' category susceptible. Set the `guideline`
#> option to either "CLSI" or "EUCAST", see `?AMR-options`. #> argument or the `AMR_guideline` option to either "CLSI" or
#> "EUCAST", see `?AMR-options`.
#> This message will be shown once per session. #> This message will be shown once per session.
#> # A tibble: 3 × 5 #> # A tibble: 3 × 5
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int #> ward GEN_total_R GEN_conf_int TOB_total_R
#> <chr> <dbl> <chr> <dbl> <chr> #> <chr> <dbl> <chr> <dbl>
#> 1 Clinical 0.229 0.205-0.254 0.315 0.284-0.347 #> 1 Clinical 0.229 0.205-0.254 0.315
#> 2 ICU 0.290 0.253-0.33 0.400 0.353-0.449 #> 2 ICU 0.290 0.253-0.33 0.400
#> 3 Outpatient 0.2 0.131-0.285 0.368 0.254-0.493 #> 3 Outpatient 0.2 0.131-0.285 0.368
#> # 1 more variable: TOB_conf_int <chr>
``` ```
Or use [antimicrobial Or use [antimicrobial
@@ -344,15 +346,16 @@ out <- example_isolates %>%
# calculate AMR using resistance(), over all aminoglycosides and polymyxins: # calculate AMR using resistance(), over all aminoglycosides and polymyxins:
summarise(across(c(aminoglycosides(), polymyxins()), summarise(across(c(aminoglycosides(), polymyxins()),
resistance)) resistance))
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK #> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (amikacin), and KAN (kanamycin) #> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `polymyxins()` using column COL (colistin) #> For `polymyxins()` using column COL (colistin)
#> Warning: There was 1 warning in `summarise()`. #> Warning: There was 1 warning in `summarise()`.
#> In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`. #> In argument: `across(c(aminoglycosides(), polymyxins()),
#> resistance)`.
#> In group 3: `ward = "Outpatient"`. #> In group 3: `ward = "Outpatient"`.
#> Caused by warning: #> Caused by warning:
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient" #> ! Introducing NA: only 23 results available for KAN in group:
#> (whilst `minimum = 30`). #> ward = "Outpatient" (whilst `minimum = 30`).
out out
#> # A tibble: 3 × 6 #> # A tibble: 3 × 6
#> ward GEN TOB AMK KAN COL #> ward GEN TOB AMK KAN COL
@@ -366,11 +369,12 @@ out
# transform the antibiotic columns to names: # transform the antibiotic columns to names:
out %>% set_ab_names() out %>% set_ab_names()
#> # A tibble: 3 × 6 #> # A tibble: 3 × 6
#> ward gentamicin tobramycin amikacin kanamycin colistin #> ward gentamicin tobramycin amikacin kanamycin
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> #> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Clinical 0.229 0.315 0.626 1 0.780 #> 1 Clinical 0.229 0.315 0.626 1
#> 2 ICU 0.290 0.400 0.662 1 0.857 #> 2 ICU 0.290 0.400 0.662 1
#> 3 Outpatient 0.2 0.368 0.605 NA 0.889 #> 3 Outpatient 0.2 0.368 0.605 NA
#> # 1 more variable: colistin <dbl>
``` ```
``` r ``` r

View File

@@ -46,7 +46,7 @@ A list with class \code{"htest"} containing the following
\code{(observed - expected) / sqrt(expected)}.} \code{(observed - expected) / sqrt(expected)}.}
\item{stdres}{standardized residuals, \item{stdres}{standardized residuals,
\code{(observed - expected) / sqrt(V)}, where \code{V} is the \code{(observed - expected) / sqrt(V)}, where \code{V} is the
residual cell variance (Agresti, 2007, section 2.4.5 residual cell variance {(\if{html}{\out{<a href="#reference+chisq.test.Rd+R+3AAgresti+3A2007" class="citation">}}Agresti 2007\if{html}{\out{</a>}}, section 2.4.5)}
for the case where \code{x} is a matrix, \code{n * p * (1 - p)} otherwise).} for the case where \code{x} is a matrix, \code{n * p * (1 - p)} otherwise).}
} }
\description{ \description{

View File

@@ -42,8 +42,9 @@ ggplot_pca(x, choices = 1:2, scale = 1, pc.biplot = TRUE,
} }
\item{pc.biplot}{ \item{pc.biplot}{
If true, use what Gabriel (1971) refers to as a "principal component If true, use what {\if{html}{\cite{}\out{<a href="#reference+biplot.princomp.Rd+R+3AGabriel+3A1971" class="citation">}}Gabriel (1971)\if{html}{\out{</a>}}} refers to as a
biplot", with \code{lambda = 1} and observations scaled up by sqrt(n) and \dQuote{principal component biplot},
with \code{lambda = 1} and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations variables approximate covariances and distances between observations
approximate Mahalanobis distance. approximate Mahalanobis distance.

View File

@@ -200,7 +200,7 @@ All functions will, at default, \strong{not} keep old taxonomic properties, as s
The short name (\code{\link[=mo_shortname]{mo_shortname()}}) returns the first character of the genus and the full species, such as \code{"E. coli"}, for species and subspecies. Exceptions are abbreviations of staphylococci (such as \emph{"CoNS"}, Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as \emph{"GBS"}, Group B Streptococci). Please bear in mind that e.g. \emph{E. coli} could mean \emph{Escherichia coli} (kingdom of Bacteria) as well as \emph{Entamoeba coli} (kingdom of Protozoa). Returning to the full name will be done using \code{\link[=as.mo]{as.mo()}} internally, giving priority to bacteria and human pathogens, i.e. \code{"E. coli"} will always be considered \emph{Escherichia coli}. As a result, \code{mo_fullname(mo_shortname("Entamoeba coli"))} returns \code{"Escherichia coli"}. The short name (\code{\link[=mo_shortname]{mo_shortname()}}) returns the first character of the genus and the full species, such as \code{"E. coli"}, for species and subspecies. Exceptions are abbreviations of staphylococci (such as \emph{"CoNS"}, Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as \emph{"GBS"}, Group B Streptococci). Please bear in mind that e.g. \emph{E. coli} could mean \emph{Escherichia coli} (kingdom of Bacteria) as well as \emph{Entamoeba coli} (kingdom of Protozoa). Returning to the full name will be done using \code{\link[=as.mo]{as.mo()}} internally, giving priority to bacteria and human pathogens, i.e. \code{"E. coli"} will always be considered \emph{Escherichia coli}. As a result, \code{mo_fullname(mo_shortname("Entamoeba coli"))} returns \code{"Escherichia coli"}.
Following the formal introduction of the new kingdom rank into prokaryotic nomenclature by G\u00f6ker and Oren (2024, \doi{10.1099/ijsem.0.006242}), \code{\link[=mo_kingdom]{mo_kingdom()}} and \code{\link[=mo_domain]{mo_domain()}} return different results for bacteria and archaea: \code{\link[=mo_kingdom]{mo_kingdom()}} returns the new formal kingdom (e.g. "Pseudomonadati", "Bacillati"), while \code{\link[=mo_domain]{mo_domain()}} returns the new domain (e.g. "Bacteria", "Archaea"). For non-prokaryotic organisms, both functions return identical results. Following the formal introduction of the new kingdom rank into prokaryotic nomenclature by G"{o}ker and Oren (2024, \doi{10.1099/ijsem.0.006242}), \code{\link[=mo_kingdom]{mo_kingdom()}} and \code{\link[=mo_domain]{mo_domain()}} return different results for bacteria and archaea: \code{\link[=mo_kingdom]{mo_kingdom()}} returns the new formal kingdom (e.g. "Pseudomonadati", "Bacillati"), while \code{\link[=mo_domain]{mo_domain()}} returns the new domain (e.g. "Bacteria", "Archaea"). For non-prokaryotic organisms, both functions return identical results.
Determination of human pathogenicity (\code{\link[=mo_pathogenicity]{mo_pathogenicity()}}) is strongly based on Bartlett \emph{et al.} (2022, \doi{10.1099/mic.0.001269}). This function returns a \link{factor} with the levels \emph{Pathogenic}, \emph{Potentially pathogenic}, \emph{Non-pathogenic}, and \emph{Unknown}. Determination of human pathogenicity (\code{\link[=mo_pathogenicity]{mo_pathogenicity()}}) is strongly based on Bartlett \emph{et al.} (2022, \doi{10.1099/mic.0.001269}). This function returns a \link{factor} with the levels \emph{Pathogenic}, \emph{Potentially pathogenic}, \emph{Non-pathogenic}, and \emph{Unknown}.