1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 00:32:34 +02:00

(v1.1.0.9007) lose dependencies

This commit is contained in:
2020-05-16 21:40:50 +02:00
parent 29609a0e2c
commit f68d71a5e0
44 changed files with 178 additions and 140 deletions

View File

@ -132,11 +132,12 @@ x <- resistance_predict(example_isolates,
year_min = 2010,
model = "binomial")
plot(x)
ggplot_rsi_predict(x)
if (require("ggplot2")) {
ggplot_rsi_predict(x)
}
# using dplyr:
if (!require("dplyr")) {
library(dplyr)
if (require("dplyr")) {
x <- example_isolates \%>\%
filter_first_isolate() \%>\%
filter(mo_genus(mo) == "Staphylococcus") \%>\%
@ -149,7 +150,7 @@ if (!require("dplyr")) {
}
# create nice plots with ggplot2 yourself
if (!require(ggplot2) & !require("dplyr")) {
if (require(ggplot2) & require("dplyr")) {
data <- example_isolates \%>\%
filter(mo == as.mo("E. coli")) \%>\%