1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 11:11:54 +02:00

(v0.8.0.9033) antivirals data set, cleanup

This commit is contained in:
2019-11-18 12:10:47 +01:00
parent 67f3f4387b
commit 267320f15f
97 changed files with 1131 additions and 644 deletions

View File

@ -459,7 +459,7 @@ data_1st %>%
## Independence test
The next example uses the included `example_isolates`, which is an anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. This `data.frame` can be used to practice AMR analysis.
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 practice AMR 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:

View File

@ -21,11 +21,11 @@ knitr::opts_chunk$set(
library(AMR)
```
With the function `mdro()`, you can determine multi-drug resistant organisms (MDRO).
With the function `mdro()`, you can determine which micro-organisms are multi-drug resistant organisms (MDRO).
#### Type of input
The `mdro()` takes a data set as input, such as a regular `data.frame`. It automatically determines the right columns for info about your isolates, like the name of the species and all columns with results of antimicrobial agents. See the help page for more info about how to set the right settings for your data with the command `?mdro`.
The `mdro()` function takes a data set as input, such as a regular `data.frame`. It tries to automatically determine the right columns for info about your isolates, like the name of the species and all columns with results of antimicrobial agents. See the help page for more info about how to set the right settings for your data with the command `?mdro`.
For WHONET data (and most other data), all settings are automatically set correctly.
@ -51,7 +51,9 @@ The function support multiple guidelines. You can select a guideline with the `g
#### Examples
The `mdro()` function always returns an ordered `factor`. For example, the output of the default guideline by Magiorakos *et al.* returns a `factor` with levels 'Negative', 'MDR', 'XDR' or 'PDR' in that order. If we test that guideline on the included `example_isolates` data set, we get:
The `mdro()` function always returns an ordered `factor`. For example, the output of the default guideline by Magiorakos *et al.* returns a `factor` with levels 'Negative', 'MDR', 'XDR' or 'PDR' in that order.
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 practice AMR analysis. If we test the MDR/XDR/PDR guideline on this data set, we get:
```{r, message = FALSE}
library(dplyr) # to support pipes: %>%
@ -62,7 +64,7 @@ example_isolates %>%
freq() # show frequency table of the result
```
```{r, echo = FALSE, results = 'asis', message = FALSE, warning = FALSE}
library(dplyr) # to support pipes: %>%
library(dplyr)
example_isolates %>%
mdro(info = FALSE) %>%
freq() # show frequency table of the result