mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 17:41:59 +02:00
(v1.7.1.9002) ab class selectors update
This commit is contained in:
@ -167,6 +167,12 @@ if (require("dplyr")) {
|
||||
n1 = count_all(CIP), # the actual total; sum of all three
|
||||
n2 = n_rsi(CIP), # same - analogous to n_distinct
|
||||
total = n()) # NOT the number of tested isolates!
|
||||
|
||||
# Number of available isolates for a whole antibiotic class
|
||||
# (i.e., in this data set columns GEN, TOB, AMK, KAN)
|
||||
example_isolates \%>\%
|
||||
group_by(hospital_id) \%>\%
|
||||
summarise(across(aminoglycosides(), n_rsi))
|
||||
|
||||
# Count co-resistance between amoxicillin/clav acid and gentamicin,
|
||||
# so we can see that combination therapy does a lot more than mono therapy.
|
||||
|
44
man/plot.Rd
44
man/plot.Rd
@ -4,10 +4,13 @@
|
||||
\alias{plot}
|
||||
\alias{plot.mic}
|
||||
\alias{ggplot.mic}
|
||||
\alias{autoplot.mic}
|
||||
\alias{plot.disk}
|
||||
\alias{ggplot.disk}
|
||||
\alias{autoplot.disk}
|
||||
\alias{plot.rsi}
|
||||
\alias{ggplot.rsi}
|
||||
\alias{autoplot.rsi}
|
||||
\title{Plotting for Classes \code{rsi}, \code{mic} and \code{disk}}
|
||||
\usage{
|
||||
\method{plot}{mic}(
|
||||
@ -39,6 +42,21 @@
|
||||
...
|
||||
)
|
||||
|
||||
\method{autoplot}{mic}(
|
||||
data,
|
||||
mapping = NULL,
|
||||
title = paste("MIC values of", deparse(substitute(data))),
|
||||
ylab = "Frequency",
|
||||
xlab = "Minimum Inhibitory Concentration (mg/L)",
|
||||
mo = NULL,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
colours_RSI = c("#ED553B", "#3CAEA3", "#F6D55C"),
|
||||
language = get_locale(),
|
||||
expand = TRUE,
|
||||
...
|
||||
)
|
||||
|
||||
\method{plot}{disk}(
|
||||
x,
|
||||
main = paste("Disk zones of", deparse(substitute(x))),
|
||||
@ -68,6 +86,21 @@
|
||||
...
|
||||
)
|
||||
|
||||
\method{autoplot}{disk}(
|
||||
data,
|
||||
mapping = NULL,
|
||||
title = paste("Disk zones of", deparse(substitute(data))),
|
||||
ylab = "Frequency",
|
||||
xlab = "Disk diffusion diameter (mm)",
|
||||
mo = NULL,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
colours_RSI = c("#ED553B", "#3CAEA3", "#F6D55C"),
|
||||
language = get_locale(),
|
||||
expand = TRUE,
|
||||
...
|
||||
)
|
||||
|
||||
\method{plot}{rsi}(
|
||||
x,
|
||||
ylab = "Percentage",
|
||||
@ -86,6 +119,17 @@
|
||||
language = get_locale(),
|
||||
...
|
||||
)
|
||||
|
||||
\method{autoplot}{rsi}(
|
||||
data,
|
||||
mapping = NULL,
|
||||
title = paste("Resistance Overview of", deparse(substitute(data))),
|
||||
xlab = "Antimicrobial Interpretation",
|
||||
ylab = "Frequency",
|
||||
colours_RSI = c("#ED553B", "#3CAEA3", "#F6D55C"),
|
||||
language = get_locale(),
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{x, data}{MIC values created with \code{\link[=as.mic]{as.mic()}} or disk diffusion values created with \code{\link[=as.disk]{as.disk()}}}
|
||||
|
@ -4,8 +4,9 @@
|
||||
\alias{resistance_predict}
|
||||
\alias{rsi_predict}
|
||||
\alias{plot.resistance_predict}
|
||||
\alias{ggplot.resistance_predict}
|
||||
\alias{ggplot_rsi_predict}
|
||||
\alias{ggplot.resistance_predict}
|
||||
\alias{autoplot.resistance_predict}
|
||||
\title{Predict antimicrobial resistance}
|
||||
\usage{
|
||||
resistance_predict(
|
||||
@ -40,9 +41,16 @@ rsi_predict(
|
||||
|
||||
\method{plot}{resistance_predict}(x, main = paste("Resistance Prediction of", x_name), ...)
|
||||
|
||||
ggplot_rsi_predict(
|
||||
x,
|
||||
main = paste("Resistance Prediction of", x_name),
|
||||
ribbon = TRUE,
|
||||
...
|
||||
)
|
||||
|
||||
\method{ggplot}{resistance_predict}(x, main = paste("Resistance Prediction of", x_name), ribbon = TRUE, ...)
|
||||
|
||||
ggplot_rsi_predict(
|
||||
\method{autoplot}{resistance_predict}(
|
||||
x,
|
||||
main = paste("Resistance Prediction of", x_name),
|
||||
ribbon = TRUE,
|
||||
|
Reference in New Issue
Block a user