mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 10:31:53 +02:00
(v0.7.1.9076) mo codes
This commit is contained in:
@ -121,8 +121,7 @@ data <- data.frame(date = sample(dates, size = sample_size, replace = TRUE),
|
||||
CIP = sample(ab_interpretations, size = sample_size, replace = TRUE,
|
||||
prob = c(0.80, 0.00, 0.20)),
|
||||
GEN = sample(ab_interpretations, size = sample_size, replace = TRUE,
|
||||
prob = c(0.92, 0.00, 0.08))
|
||||
)
|
||||
prob = c(0.92, 0.00, 0.08)))
|
||||
```
|
||||
|
||||
Using the `left_join()` function from the `dplyr` package, we can 'map' the gender to the patient ID using the `patients_table` object we created earlier:
|
||||
|
@ -95,7 +95,7 @@ In the table above, all measurements are shown in milliseconds (thousands of sec
|
||||
|
||||
To achieve this speed, the `as.mo` function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of *Thermus islandicus* (`B_THERMS_ISLN`), a bug probably never found before in humans:
|
||||
|
||||
```{r}
|
||||
```{r, warning=FALSE}
|
||||
T.islandicus <- microbenchmark(as.mo("theisl"),
|
||||
as.mo("THEISL"),
|
||||
as.mo("T. islandicus"),
|
||||
|
Reference in New Issue
Block a user