1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 16:21:59 +02:00

(v1.7.1.9024) unit tests

This commit is contained in:
2021-08-17 14:34:11 +02:00
parent a2d249962f
commit a44283f998
99 changed files with 550 additions and 501 deletions

View File

@ -5,11 +5,11 @@
\alias{ab_name}
\alias{set_ab_names}
\alias{ATC}
\alias{ab_atc}
\alias{ab_cid}
\alias{ab_synonyms}
\alias{ab_tradenames}
\alias{ab_group}
\alias{ab_atc}
\alias{ab_atc_group1}
\alias{ab_atc_group2}
\alias{ab_loinc}
@ -28,8 +28,6 @@ set_ab_names(
snake_case = property == "name"
)
ab_atc(x, ...)
ab_cid(x, ...)
ab_synonyms(x, ...)
@ -38,6 +36,8 @@ ab_tradenames(x, ...)
ab_group(x, language = get_locale(), ...)
ab_atc(x, only_first = FALSE, ...)
ab_atc_group1(x, language = get_locale(), ...)
ab_atc_group2(x, language = get_locale(), ...)
@ -69,6 +69,8 @@ ab_property(x, property = "name", language = get_locale(), ...)
\item{snake_case}{a \link{logical} to indicate whether the names should be in so-called \href{https://en.wikipedia.org/wiki/Snake_case}{snake case}: in lower case and all spaces/slashes replaced with an underscore (\verb{_})}
\item{only_first}{a \link{logical} to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)}
\item{administration}{way of administration, either \code{"oral"} or \code{"iv"}}
\item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}}
@ -122,7 +124,7 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
\examples{
# all properties:
ab_name("AMX") # "Amoxicillin"
ab_atc("AMX") # J01CA04 (ATC code from the WHO)
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