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:
@ -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")) \%>\%
|
||||
|
Reference in New Issue
Block a user