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

(v1.1.0.9004) lose dependencies

This commit is contained in:
2020-05-16 13:05:47 +02:00
parent 9fce546901
commit 7f3da74b17
111 changed files with 3211 additions and 2345 deletions

View File

@ -134,22 +134,22 @@ x <- resistance_predict(example_isolates,
plot(x)
ggplot_rsi_predict(x)
# use dplyr so you can actually read it:
library(dplyr)
x <- example_isolates \%>\%
filter_first_isolate() \%>\%
filter(mo_genus(mo) == "Staphylococcus") \%>\%
resistance_predict("PEN", model = "binomial")
plot(x)
# get the model from the object
mymodel <- attributes(x)$model
summary(mymodel)
# using dplyr:
if (!require("dplyr")) {
library(dplyr)
x <- example_isolates \%>\%
filter_first_isolate() \%>\%
filter(mo_genus(mo) == "Staphylococcus") \%>\%
resistance_predict("PEN", model = "binomial")
plot(x)
# get the model from the object
mymodel <- attributes(x)$model
summary(mymodel)
}
# create nice plots with ggplot2 yourself
if (!require(ggplot2)) {
if (!require(ggplot2) & !require("dplyr")) {
data <- example_isolates \%>\%
filter(mo == as.mo("E. coli")) \%>\%