fix AMR vignette

This commit is contained in:
dr. M.S. (Matthijs) Berends 2022-08-28 22:38:08 +02:00
parent e975a3043c
commit e7af5fc716
9 changed files with 20 additions and 17 deletions

View File

@ -156,4 +156,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: artifacts-${{ matrix.config.os }}-r${{ matrix.config.r }}
path: ~/AMR.Rcheck
path: ${{ github.workspace }}/AMR.Rcheck

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.8.1.9043
Version: 1.8.1.9045
Date: 2022-08-28
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
@ -20,6 +20,7 @@ Authors@R: c(
person(family = "Knight", c("Gwen"), role = "ctb", comment = c(ORCID = "0000-0002-7263-9896")),
person(family = "Lenglet", c("Annick"), role = "ctb", comment = c(ORCID = "0000-0003-2013-8405")),
person(family = "Meijer", c("Bart", "C."), role = "ctb"),
person(family = "Mykhailenko", c("Dmytro"), role = "ctb"),
person(family = "Mymrikov", c("Anton"), role = "ctb"),
person(family = "Ny", c("Sofia"), role = "ctb", comment = c(ORCID = "0000-0002-2017-1363")),
person(family = "Schade", c("Rogier", "P."), role = "ctb"),

View File

@ -1,4 +1,4 @@
# AMR 1.8.1.9043
# AMR 1.8.1.9045
### New
* EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.

View File

@ -26,7 +26,7 @@
#' Calculate the Matching Score for Microorganisms
#'
#' This algorithm is used by [as.mo()] and all the [`mo_*`][mo_property()] functions to determine the most probable match of taxonomic records based on user input.
#' @author Dr Matthijs Berends
#' @author Dr. Matthijs Berends
#' @param x Any user input value(s)
#' @param n A full taxonomic name, that exists in [`microorganisms$fullname`][microorganisms]
#' @section Matching Score for Microorganisms:

Binary file not shown.

View File

@ -29,7 +29,7 @@
library(dplyr, warn.conflicts = FALSE)
devtools::load_all(quiet = TRUE)
suppressMessages(set_AMR_locale("en"))
suppressMessages(set_AMR_locale("English"))
old_globalenv <- ls(envir = globalenv())
@ -473,7 +473,7 @@ rm(list = current_globalenv[!current_globalenv %in% old_globalenv])
rm(current_globalenv)
devtools::load_all(quiet = TRUE)
suppressMessages(set_AMR_locale("English"))
# Update URLs -------------------------------------------------------------
usethis::ui_info("Checking URLs for redirects")
@ -500,3 +500,4 @@ invisible(capture.output(styler::style_dir(
# Finished ----------------------------------------------------------------
usethis::ui_done("All done")
suppressMessages(reset_AMR_locale())

View File

@ -1,6 +1,6 @@
pattern regular_expr case_sensitive affect_ab_name affect_mo_name zh da nl fr de el it ja pl pt ru es sv tr uk
language name English FALSE FALSE FALSE FALSE Chinese Danish Dutch French German Greek Italian Japanese Polish Portuguese Russian Spanish Swedish Turkish Ukrainian
language name FALSE FALSE FALSE FALSE 汉语 Dansk Nederlands Français Deutsch Ελληνικά Italiano 日本語 Polski Português Русский Español Svenska Türkçe украї́нська
language name FALSE FALSE FALSE FALSE 汉语 Dansk Nederlands Français Deutsch Ελληνικά Italiano 日本語 Polski Português Русский Español Svenska Türkçe Українська
Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阴性葡萄球菌 Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα Staphylococcus negativo coagulasi コアグラーゼ陰性ブドウ球菌 Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок
Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阳性葡萄球菌 Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη Staphylococcus positivo coagulasi コアグラーゼ陽性ブドウ球菌 Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок
Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE β-溶血性链球菌 Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок
@ -269,4 +269,4 @@ Glycopeptides FALSE TRUE TRUE FALSE 糖肽类药物 Glykopeptider Glycopeptiden
Macrolides/lincosamides FALSE TRUE TRUE FALSE 大环内酯类/林可酰胺类 Makrolider/lincosamider Macroliden/lincosamiden Macrolides/lincosamides Makrolide/Linkosamide Μακρολίδια/λινκοσαμίδια Macrolidi/lincosamidi ポリミキシン Makrolidy/linkozamidy Macrolides/lincosamidas Макролиды/линкозамиды Macrólidos/lincosamidas Makrolider/linkosamider Makrolidler/linkozamidler Макроліди/лінкозаміди
Other antibacterials FALSE TRUE TRUE FALSE 其他抗菌剂 Andre antibakterielle stoffer Overige antibiotica Autres antibactériens Andere Antibiotika Άλλα αντιβακτηριακά Altri antibatterici キノロン Inne środki przeciwbakteryjne Outros antibacterianos Другие антибактериальные препараты Otros antibacterianos Andra antibakteriella medel Diğer antibakteriyeller Інші антибактеріальні засоби
Polymyxins FALSE TRUE TRUE FALSE 多粘菌素类 Polymyxiner Polymyxines Polymyxines Polymyxine Πολυμυξίνες Polimixine ポリミキシン Polimyksyny Polimixinas Полимиксины Polimixinas Polymyxiner Polimiksinler Поліміксини
Quinolones FALSE TRUE TRUE FALSE 喹诺酮类 Kinoloner Quinolonen Quinolones Quinolone Κινολόνες Chinoloni キノロン Quinolony Quinolones Хинолоны Quinolonas Kinoloner Kinolonlar Хінолони
Quinolones FALSE TRUE TRUE FALSE 喹诺酮类 Kinoloner Quinolonen Quinolones Quinolone Κινολόνες Chinoloni キノロン Quinolony Quinolones Хинолоны Quinolonas Kinoloner Kinolonlar Хінолони

1 pattern regular_expr case_sensitive affect_ab_name affect_mo_name zh da nl fr de el it ja pl pt ru es sv tr uk
2 language name English FALSE FALSE FALSE FALSE Chinese Danish Dutch French German Greek Italian Japanese Polish Portuguese Russian Spanish Swedish Turkish Ukrainian
3 language name FALSE FALSE FALSE FALSE 汉语 Dansk Nederlands Français Deutsch Ελληνικά Italiano 日本語 Polski Português Русский Español Svenska Türkçe украї́нська Українська
4 Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阴性葡萄球菌 Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα Staphylococcus negativo coagulasi コアグラーゼ陰性ブドウ球菌 Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок
5 Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阳性葡萄球菌 Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη Staphylococcus positivo coagulasi コアグラーゼ陽性ブドウ球菌 Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок
6 Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE β-溶血性链球菌 Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок
269 Macrolides/lincosamides FALSE TRUE TRUE FALSE 大环内酯类/林可酰胺类 Makrolider/lincosamider Macroliden/lincosamiden Macrolides/lincosamides Makrolide/Linkosamide Μακρολίδια/λινκοσαμίδια Macrolidi/lincosamidi ポリミキシン Makrolidy/linkozamidy Macrolides/lincosamidas Макролиды/линкозамиды Macrólidos/lincosamidas Makrolider/linkosamider Makrolidler/linkozamidler Макроліди/лінкозаміди
270 Other antibacterials FALSE TRUE TRUE FALSE 其他抗菌剂 Andre antibakterielle stoffer Overige antibiotica Autres antibactériens Andere Antibiotika Άλλα αντιβακτηριακά Altri antibatterici キノロン Inne środki przeciwbakteryjne Outros antibacterianos Другие антибактериальные препараты Otros antibacterianos Andra antibakteriella medel Diğer antibakteriyeller Інші антибактеріальні засоби
271 Polymyxins FALSE TRUE TRUE FALSE 多粘菌素类 Polymyxiner Polymyxines Polymyxines Polymyxine Πολυμυξίνες Polimixine ポリミキシン Polimyksyny Polimixinas Полимиксины Polimixinas Polymyxiner Polimiksinler Поліміксини
272 Quinolones FALSE TRUE TRUE FALSE 喹诺酮类 Kinoloner Quinolonen Quinolones Quinolone Κινολόνες Chinoloni キノロン Quinolony Quinolones Хинолоны Quinolonas Kinoloner Kinolonlar Хінолони

View File

@ -54,5 +54,5 @@ mo_matching_score(
)
}
\author{
Dr Matthijs Berends
Dr. Matthijs Berends
}

View File

@ -569,7 +569,8 @@ plot(disk_values, mo = "E. coli", ab = "cipro")
And when using the `ggplot2` package, but now choosing the latest implemented CLSI guideline (notice that the EUCAST-specific term "Susceptible, incr. exp." has changed to "Intermediate"):
```{r disk_plots_mo_ab, message = FALSE, warning = FALSE}
autoplot(disk_values,
autoplot(
disk_values,
mo = "E. coli",
ab = "cipro",
guideline = "CLSI"
@ -580,22 +581,22 @@ autoplot(disk_values,
The next example uses the `example_isolates` data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practise AMR data analysis.
We will compare the resistance to fosfomycin (column `FOS`) in hospital A and D. The input for the `fisher.test()` can be retrieved with a transformation like this:
We will compare the resistance to amoxicillin/clavulanic acid (column `FOS`) between an ICU and other clinical wards. The input for the `fisher.test()` can be retrieved with a transformation like this:
```{r, results = 'markup'}
# use package 'tidyr' to pivot data:
library(tidyr)
check_FOS <- example_isolates %>%
filter(ward %in% c("A", "D")) %>% # filter on only hospitals A and D
select(ward, FOS) %>% # select the hospitals and fosfomycin
group_by(ward) %>% # group on the hospitals
filter(ward %in% c("ICU", "Clinical")) %>% # filter on only these wards
select(ward, AMC) %>% # select the wards and amoxi/clav
group_by(ward) %>% # group on the wards
count_df(combine_SI = TRUE) %>% # count all isolates per group (ward)
pivot_wider(
names_from = ward, # transform output so A and D are columns
names_from = ward, # transform output so "ICU" and "Clinical" are columns
values_from = value
) %>%
select(A, D) %>% # and only select these columns
select(ICU, Clinical) %>% # and only select these columns
as.matrix() # transform to a good old matrix for fisher.test()
check_FOS
@ -608,4 +609,4 @@ We can apply the test now with:
fisher.test(check_FOS)
```
As can be seen, the p value is `r round(fisher.test(check_FOS)$p.value, 3)`, which means that the fosfomycin resistance found in isolates from patients in hospital A and D are really different.
As can be seen, the p value is practically zero (`r format(fisher.test(check_FOS)$p.value, scientific = FALSE)`), which means that the amoxicillin/clavulanic acid resistance found in isolates between patients in ICUs and other clinical wards are really different.