1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-27 10:06:12 +01:00
AMR/man/ab_property.Rd

133 lines
5.1 KiB
Plaintext
Raw Normal View History

2019-05-10 16:44:59 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ab_property.R
\name{ab_property}
\alias{ab_property}
\alias{ab_name}
\alias{ab_atc}
2019-11-06 14:43:23 +01:00
\alias{ATC}
2019-05-10 16:44:59 +02:00
\alias{ab_cid}
\alias{ab_synonyms}
\alias{ab_tradenames}
\alias{ab_group}
\alias{ab_atc_group1}
\alias{ab_atc_group2}
2020-01-26 20:20:00 +01:00
\alias{ab_loinc}
2019-05-10 16:44:59 +02:00
\alias{ab_ddd}
2019-05-16 22:07:31 +02:00
\alias{ab_info}
2019-05-10 16:44:59 +02:00
\title{Property of an antibiotic}
\usage{
ab_name(x, language = get_locale(), tolower = FALSE, ...)
ab_atc(x, ...)
ab_cid(x, ...)
ab_synonyms(x, ...)
ab_tradenames(x, ...)
2019-05-16 21:20:00 +02:00
ab_group(x, language = get_locale(), ...)
2019-05-10 16:44:59 +02:00
2019-05-16 21:20:00 +02:00
ab_atc_group1(x, language = get_locale(), ...)
2019-05-10 16:44:59 +02:00
2019-05-16 21:20:00 +02:00
ab_atc_group2(x, language = get_locale(), ...)
2019-05-10 16:44:59 +02:00
2020-01-26 20:20:00 +01:00
ab_loinc(x, ...)
2019-05-10 16:44:59 +02:00
ab_ddd(x, administration = "oral", units = FALSE, ...)
2019-05-16 22:07:31 +02:00
ab_info(x, language = get_locale(), ...)
2019-05-10 16:44:59 +02:00
ab_property(x, property = "name", language = get_locale(), ...)
}
\arguments{
\item{x}{any (vector of) text that can be coerced to a valid microorganism code with \code{\link[=as.ab]{as.ab()}}}
2019-05-10 16:44:59 +02:00
\item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can also be set with \code{getOption("AMR_locale")}. Use \code{language = NULL} or \code{language = ""} to prevent translation.}
2019-05-10 16:44:59 +02:00
\item{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".}
\item{...}{other parameters passed on to \code{\link[=as.ab]{as.ab()}}}
2019-05-10 16:44:59 +02:00
\item{administration}{way of administration, either \code{"oral"} or \code{"iv"}}
\item{units}{a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples}
\item{property}{one of the column names of one of the \link{antibiotics} data set}
2019-05-10 16:44:59 +02:00
}
\value{
\itemize{
\item An \code{\link{integer}} in case of \code{\link[=ab_cid]{ab_cid()}}
\item A named \code{\link{list}} in case of \code{\link[=ab_info]{ab_info()}} and multiple \code{\link[=ab_synonyms]{ab_synonyms()}}/\code{\link[=ab_tradenames]{ab_tradenames()}}
\item A \code{\link{double}} in case of \code{\link[=ab_ddd]{ab_ddd()}}
\item A \code{\link{character}} in all other cases
2019-05-10 16:44:59 +02:00
}
}
\description{
Use these functions to return a specific property of an antibiotic from the \link{antibiotics} data set. All input values will be evaluated internally with \code{\link[=as.ab]{as.ab()}}.
2019-05-10 16:44:59 +02:00
}
\details{
All output will be \link{translate}d where possible.
}
\section{Maturing lifecycle}{
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
The \link[AMR:lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. We will strive to maintain backward compatibility, but the function needs wider usage and more extensive testing in order to optimise the unlying code.
}
2019-05-10 16:44:59 +02:00
\section{Source}{
World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
WHONET 2019 software: \url{http://www.whonet.org/software.html}
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{http://ec.europa.eu/health/documents/community-register/html/atc.htm}
}
\section{Read more on our website!}{
On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
2019-05-10 16:44:59 +02:00
}
\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"
2020-01-26 20:20:00 +01:00
# smart lowercase tranformation
2019-05-10 16:44:59 +02:00
ab_name(x = c("AMC", "PLB")) # "Amoxicillin/clavulanic acid" "Polymyxin B"
ab_name(x = c("AMC", "PLB"),
tolower = TRUE) # "amoxicillin/clavulanic acid" "polymyxin B"
2020-01-26 20:20:00 +01:00
# defined daily doses (DDD)
2019-05-10 16:44:59 +02:00
ab_ddd("AMX", "oral") # 1
ab_ddd("AMX", "oral", units = TRUE) # "g"
ab_ddd("AMX", "iv") # 1
ab_ddd("AMX", "iv", units = TRUE) # "g"
2019-05-16 21:20:00 +02:00
ab_info("AMX") # all properties as a list
2020-01-26 20:20:00 +01:00
# 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")
2019-05-10 16:44:59 +02:00
}
\seealso{
\link{antibiotics}
2019-05-10 16:44:59 +02:00
}