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