Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.disk

Transform Input to Disk Diffusion Diameters


Description

This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 6 and 50.

Usage

as.disk(x, na.rm = FALSE)

is.disk(x)

Arguments

x

vector

na.rm

a logical indicating whether missing values should be removed

Details

Interpret disk values as RSI values with as.rsi(). It supports guidelines from EUCAST and CLSI.

Value

An integer with additional class disk

Stable Lifecycle


The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.

If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.

Read more on Our Website!

On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

See Also

Examples

# transform existing disk zones to the `disk` class
df <- data.frame(microorganism = "E. coli",
                 AMP = 20,
                 CIP = 14,
                 GEN = 18,
                 TOB = 16)
df[, 2:5] <- lapply(df[, 2:5], as.disk)
# same with dplyr:
# df %>% mutate(across(AMP:TOB, as.disk))

# 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(df)

AMR

Antimicrobial Resistance Data Analysis

v1.6.0
GPL-2 | file LICENSE
Authors
Matthijs S. Berends [aut, cre] (<https://orcid.org/0000-0001-7620-1800>), Christian F. Luz [aut, ctb] (<https://orcid.org/0000-0001-5809-5995>), Alexander W. Friedrich [aut, ths] (<https://orcid.org/0000-0003-4881-038X>), Bhanu N. M. Sinha [aut, ths] (<https://orcid.org/0000-0003-1634-0010>), Casper J. Albers [aut, ths] (<https://orcid.org/0000-0002-9213-6743>), Corinna Glasner [aut, ths] (<https://orcid.org/0000-0003-1241-1328>), Judith M. Fonville [ctb], Erwin E. A. Hassing [ctb], Eric H. L. C. M. Hazenberg [ctb], Gwen Knight [ctb], Annick Lenglet [ctb], Bart C. Meijer [ctb], Sofia Ny [ctb], Rogier P. Schade [ctb], Dennis Souverein [ctb], Anthony Underwood [ctb]
Initial release
2021-03-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.