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

ab_property

Get Properties of an Antibiotic


Description

Use these functions to return a specific property of an antibiotic from the antibiotics data set. All input values will be evaluated internally with as.ab().

Usage

ab_name(x, language = get_locale(), tolower = FALSE, ...)

ab_atc(x, ...)

ab_cid(x, ...)

ab_synonyms(x, ...)

ab_tradenames(x, ...)

ab_group(x, language = get_locale(), ...)

ab_atc_group1(x, language = get_locale(), ...)

ab_atc_group2(x, language = get_locale(), ...)

ab_loinc(x, ...)

ab_ddd(x, administration = "oral", units = FALSE, ...)

ab_info(x, language = get_locale(), ...)

ab_url(x, open = FALSE, ...)

ab_property(x, property = "name", language = get_locale(), ...)

Arguments

x

any (vector of) text that can be coerced to a valid antibiotic code with as.ab()

language

language of the returned text, defaults to system language (see get_locale()) and can also be set with getOption("AMR_locale"). Use language = NULL or language = "" to prevent translation.

tolower

logical to indicate whether the first character of every output should be transformed to a lower case character. This will lead to e.g. "polymyxin B" and not "polymyxin b".

...

other arguments passed on to as.ab()

administration

way of administration, either "oral" or "iv"

units

a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples

open

browse the URL using utils::browseURL()

property

one of the column names of one of the antibiotics data set

Details

All output will be translated where possible.

The function ab_url() will return the direct URL to the official WHO website. A warning will be returned if the required ATC code is not available.

Value

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.

Source

World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: https://www.whocc.no/atc_ddd_index/

European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: http://ec.europa.eu/health/documents/community-register/html/atc.htm

Reference Data Publicly Available

All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.

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

# all properties:
ab_name("AMX")       # "Amoxicillin"
ab_atc("AMX")        # J01CA04 (ATC code from the WHO)
ab_cid("AMX")        # 33613 (Compound ID from PubChem)
ab_synonyms("AMX")   # a list with brand names of amoxicillin
ab_tradenames("AMX") # same
ab_group("AMX")      # "Beta-lactams/penicillins"
ab_atc_group1("AMX") # "Beta-lactam antibacterials, penicillins"
ab_atc_group2("AMX") # "Penicillins with extended spectrum"
ab_url("AMX")        # link to the official WHO page

# smart lowercase tranformation
ab_name(x = c("AMC", "PLB"))  # "Amoxicillin/clavulanic acid" "Polymyxin B"
ab_name(x = c("AMC", "PLB"),
        tolower = TRUE)       # "amoxicillin/clavulanic acid" "polymyxin B"

# defined daily doses (DDD)
ab_ddd("AMX", "oral")               #  1
ab_ddd("AMX", "oral", units = TRUE) # "g"
ab_ddd("AMX", "iv")                 #  1
ab_ddd("AMX", "iv", units = TRUE)   # "g"

ab_info("AMX")       # all properties as a list

# all ab_* functions use as.ab() internally, so you can go from 'any' to 'any':
ab_atc("AMP")           # ATC code of AMP (ampicillin)
ab_group("J01CA01")     # Drug group of ampicillins ATC code
ab_loinc("ampicillin")  # LOINC codes of ampicillin
ab_name("21066-6")      # "Ampicillin" (using LOINC)
ab_name(6249)           # "Ampicillin" (using CID)
ab_name("J01CA01")      # "Ampicillin" (using ATC)

# spelling from different languages and dyslexia are no problem
ab_atc("ceftriaxon")
ab_atc("cephtriaxone")
ab_atc("cephthriaxone")
ab_atc("seephthriaaksone")

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.