# Property of an antibiotic — ab_property • AMR (for R)
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.

# Property of an antibiotic

`ab_property.Rd`

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`.

    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_ddd(x, administration = "oral", units = FALSE, ...)

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

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

## Arguments

x | any (vector of) text that can be coerced to a valid microorganism 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 parameters 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
property | one of the column names of one of the `antibiotics` data set

## Value

- An `integer` in case of `ab_cid`

- A named `list` in case of `ab_info` and multiple `ab_synonyms`/`ab_tradenames`

- A `double` in case of `ab_ddd`

- A `character` in all other cases

## Details

All output will be translated where possible.

## Source

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

WHONET 2019 software: http://www.whonet.org/software.html

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

## Read more on our website!

On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.

## See also

`antibiotics`

## Examples

    # NOT RUN {
    # 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_name(x = c("AMC", "PLB"))  # "Amoxicillin/clavulanic acid" "Polymyxin B"
    ab_name(x = c("AMC", "PLB"),
            tolower = TRUE)       # "amoxicillin/clavulanic acid" "polymyxin B"

    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:
    ab_name("Fluclox")   # "Flucloxacillin"
    ab_name("fluklox")   # "Flucloxacillin"
    ab_name("floxapen")  # "Flucloxacillin"
    ab_name(21319)       # "Flucloxacillin" (using CID)
    ab_name("J01CF05")   # "Flucloxacillin" (using ATC)
    # }