mirror of
https://github.com/msberends/AMR.git
synced 2026-03-29 23:35:52 +02:00
Built site for AMR@3.0.1.9037: 3d1412e
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
**Note:** values on this page will change with every website update
|
||||
since they are based on randomly created values and the page was written
|
||||
in [R Markdown](https://rmarkdown.rstudio.com/). However, the
|
||||
methodology remains unchanged. This page was generated on 20 March 2026.
|
||||
methodology remains unchanged. This page was generated on 22 March 2026.
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -51,9 +51,9 @@ structure of your data generally look like this:
|
||||
|
||||
| date | patient_id | mo | AMX | CIP |
|
||||
|:----------:|:----------:|:----------------:|:---:|:---:|
|
||||
| 2026-03-20 | abcd | Escherichia coli | S | S |
|
||||
| 2026-03-20 | abcd | Escherichia coli | S | R |
|
||||
| 2026-03-20 | efgh | Escherichia coli | R | S |
|
||||
| 2026-03-22 | abcd | Escherichia coli | S | S |
|
||||
| 2026-03-22 | abcd | Escherichia coli | S | R |
|
||||
| 2026-03-22 | efgh | Escherichia coli | R | S |
|
||||
|
||||
### Needed R packages
|
||||
|
||||
@@ -120,16 +120,16 @@ of input:
|
||||
|
||||
``` r
|
||||
as.mo("Klebsiella pneumoniae")
|
||||
#> Class 'mo'
|
||||
#> Class <mo>
|
||||
#> [1] B_KLBSL_PNMN
|
||||
as.mo("K. pneumoniae")
|
||||
#> Class 'mo'
|
||||
#> Class <mo>
|
||||
#> [1] B_KLBSL_PNMN
|
||||
as.mo("KLEPNE")
|
||||
#> Class 'mo'
|
||||
#> Class <mo>
|
||||
#> [1] B_KLBSL_PNMN
|
||||
as.mo("KLPN")
|
||||
#> Class 'mo'
|
||||
#> Class <mo>
|
||||
#> [1] B_KLBSL_PNMN
|
||||
```
|
||||
|
||||
@@ -169,9 +169,8 @@ our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE)
|
||||
#> ℹ Retrieved values from the `microorganisms.codes` data set for "ESCCOL",
|
||||
#> "KLEPNE", "STAAUR", and "STRPNE".
|
||||
#> ℹ Microorganism translation was uncertain for four microorganisms. Run
|
||||
#> `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to review these
|
||||
#> uncertainties, or use `add_custom_microorganisms()`
|
||||
#> (`?AMR::add_custom_microorganisms()`) to add custom entries.
|
||||
#> `?mo_uncertainties()` to review these uncertainties, or use
|
||||
#> `?add_custom_microorganisms()` to add custom entries.
|
||||
```
|
||||
|
||||
Apparently, there was some uncertainty about the translation to
|
||||
@@ -180,8 +179,7 @@ taxonomic codes. Let’s check this:
|
||||
``` r
|
||||
mo_uncertainties()
|
||||
#> Matching scores are based on the resemblance between the input and the full
|
||||
#> taxonomic name, and the pathogenicity in humans. See `mo_matching_score()`
|
||||
#> (`?AMR::mo_matching_score()`).
|
||||
#> taxonomic name, and the pathogenicity in humans. See `?mo_matching_score()`.
|
||||
#> Colour keys: 0.000-0.549 0.550-0.649 0.650-0.749 0.750-1.000
|
||||
#> -------------------------------------------------------------------------------
|
||||
#> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688)
|
||||
@@ -213,10 +211,9 @@ mo_uncertainties()
|
||||
#> pseudintermedius (0.532), Serratia proteamaculans proteamaculans (0.526),
|
||||
#> Streptococcus gallolyticus pasteurianus (0.526), Salmonella Portanigra (0.524),
|
||||
#> and Streptococcus periodonticum (0.519)
|
||||
#> ℹ Only the first 10 other matches of each record are shown. Run
|
||||
#> `print(mo_uncertainties(), n = ...)` (`?AMR::mo_uncertainties()`) to view
|
||||
#> more entries, or save `mo_uncertainties()` (`?AMR::mo_uncertainties()`) to an
|
||||
#> object.
|
||||
#> ℹ Only the first 10 other matches of each record are shown. Run ``
|
||||
#> ?`print(mo_uncertainties(), n = ...)` `` to view more entries, or save
|
||||
#> `?mo_uncertainties()` to an object.
|
||||
```
|
||||
|
||||
That’s all good.
|
||||
@@ -450,7 +447,8 @@ in:
|
||||
``` r
|
||||
our_data_1st %>%
|
||||
select(date, aminoglycosides())
|
||||
#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)
|
||||
#> ℹ For `?aminoglycosides()` using column GEN
|
||||
#> (gentamicin)
|
||||
#> # A tibble: 2,724 × 2
|
||||
#> date GEN
|
||||
#> <date> <sir>
|
||||
@@ -468,7 +466,7 @@ our_data_1st %>%
|
||||
|
||||
our_data_1st %>%
|
||||
select(bacteria, betalactams())
|
||||
#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC'
|
||||
#> ℹ For `?betalactams()` using columns AMX (amoxicillin) and AMC
|
||||
#> (amoxicillin/clavulanic acid)
|
||||
#> # A tibble: 2,724 × 3
|
||||
#> bacteria AMX AMC
|
||||
@@ -505,7 +503,8 @@ our_data_1st %>%
|
||||
# filtering using AB selectors is also possible:
|
||||
our_data_1st %>%
|
||||
filter(any(aminoglycosides() == "R"))
|
||||
#> ℹ For `aminoglycosides()` using column 'GEN' (gentamicin)
|
||||
#> ℹ For `?aminoglycosides()` using column GEN
|
||||
#> (gentamicin)
|
||||
#> # A tibble: 981 × 9
|
||||
#> patient_id hospital date bacteria AMX AMC CIP GEN first
|
||||
#> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl>
|
||||
@@ -523,7 +522,7 @@ our_data_1st %>%
|
||||
|
||||
our_data_1st %>%
|
||||
filter(all(betalactams() == "R"))
|
||||
#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC'
|
||||
#> ℹ For `?betalactams()` using columns AMX (amoxicillin) and AMC
|
||||
#> (amoxicillin/clavulanic acid)
|
||||
#> # A tibble: 462 × 9
|
||||
#> patient_id hospital date bacteria AMX AMC CIP GEN first
|
||||
@@ -542,7 +541,7 @@ our_data_1st %>%
|
||||
|
||||
# even works in base R (since R 3.0):
|
||||
our_data_1st[all(betalactams() == "R"), ]
|
||||
#> ℹ For `betalactams()` using columns 'AMX' (amoxicillin) and 'AMC'
|
||||
#> ℹ For `?betalactams()` using columns AMX (amoxicillin) and AMC
|
||||
#> (amoxicillin/clavulanic acid)
|
||||
#> # A tibble: 462 × 9
|
||||
#> patient_id hospital date bacteria AMX AMC CIP GEN first
|
||||
@@ -625,9 +624,9 @@ antibiotic class selectors:
|
||||
``` r
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()))
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin),
|
||||
#> 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
#> ℹ For `?aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin),
|
||||
#> AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `?carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
```
|
||||
|
||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
@@ -664,8 +663,8 @@ antibiogram(example_isolates,
|
||||
antibiotics = aminoglycosides(),
|
||||
ab_transform = "name",
|
||||
language = "es")
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin),
|
||||
#> 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `?aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin),
|
||||
#> AMK (amikacin), and KAN (kanamycin)
|
||||
```
|
||||
|
||||
| Patógeno | Amikacina | Gentamicina | Kanamicina | Tobramicina |
|
||||
@@ -708,9 +707,9 @@ on certain columns:
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()),
|
||||
syndromic_group = "ward")
|
||||
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB' (tobramycin),
|
||||
#> 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
#> ℹ For `?aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin),
|
||||
#> AMK (amikacin), and KAN (kanamycin)
|
||||
#> ℹ For `?carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
|
||||
```
|
||||
|
||||
| Syndromic Group | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||
@@ -841,10 +840,9 @@ These functions can be used on their own:
|
||||
|
||||
``` r
|
||||
our_data_1st %>% resistance(AMX)
|
||||
#> ℹ `resistance()` (`?AMR::resistance()`) assumes the EUCAST guideline and thus
|
||||
#> considers the 'I' category susceptible. Set the `guideline` argument or the
|
||||
#> `AMR_guideline` option to either "CLSI" or "EUCAST", see AMR-options
|
||||
#> (`?AMR::AMR-options`).
|
||||
#> ℹ `?resistance()` assumes the EUCAST guideline and thus considers the 'I'
|
||||
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
|
||||
#> option to either "CLSI" or "EUCAST", see AMR-options.
|
||||
#> ℹ This message will be shown once per session.
|
||||
#> [1] 0.4203377
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user