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

styled, unit test fix

This commit is contained in:
2022-08-28 10:31:50 +02:00
parent 4cb1db4554
commit 4d050aef7c
147 changed files with 10897 additions and 8169 deletions

View File

@ -35,11 +35,13 @@ Interpret disk values as RSI values with \code{\link[=as.rsi]{as.rsi()}}. It sup
}
\examples{
# transform existing disk zones to the `disk` class (using base R)
df <- data.frame(microorganism = "Escherichia coli",
AMP = 20,
CIP = 14,
GEN = 18,
TOB = 16)
df <- data.frame(
microorganism = "Escherichia coli",
AMP = 20,
CIP = 14,
GEN = 18,
TOB = 16
)
df[, 2:5] <- lapply(df[, 2:5], as.disk)
str(df)
@ -51,10 +53,12 @@ if (require("dplyr")) {
}
# interpret disk values, see ?as.rsi
as.rsi(x = as.disk(18),
mo = "Strep pneu", # `mo` will be coerced with as.mo()
ab = "ampicillin", # and `ab` with as.ab()
guideline = "EUCAST")
as.rsi(
x = as.disk(18),
mo = "Strep pneu", # `mo` will be coerced with as.mo()
ab = "ampicillin", # and `ab` with as.ab()
guideline = "EUCAST"
)
# interpret whole data set, pretend to be all from urinary tract infections:
as.rsi(df, uti = TRUE)