mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 23:21:56 +02:00
atc and bactid functions, readme update
This commit is contained in:
@ -7,24 +7,24 @@
|
||||
\code{\link{antibiotics}}
|
||||
}
|
||||
\usage{
|
||||
abname(abcode, from = c("guess", "atc", "molis", "umcg"),
|
||||
abname(abcode, from = c("guess", "atc", "certe", "umcg"),
|
||||
to = "official", textbetween = " + ", tolower = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{abcode}{a code or name, like \code{"AMOX"}, \code{"AMCL"} or \code{"J01CA04"}}
|
||||
|
||||
\item{from, to}{type to transform from and to. See \code{\link{antibiotics}} for its column names. WIth \code{from = "guess"} the from will be guessed from \code{"atc"}, \code{"molis"} and \code{"umcg"}. When using \code{to = "atc"}, the ATC code will be searched using \code{\link{guess_atc}}.}
|
||||
\item{from, to}{type to transform from and to. See \code{\link{antibiotics}} for its column names. WIth \code{from = "guess"} the from will be guessed from \code{"atc"}, \code{"certe"} and \code{"umcg"}. When using \code{to = "atc"}, the ATC code will be searched using \code{\link{as.atc}}.}
|
||||
|
||||
\item{textbetween}{text to put between multiple returned texts}
|
||||
|
||||
\item{tolower}{return output as lower case with function \code{\link{tolower}}.}
|
||||
}
|
||||
\description{
|
||||
Convert antibiotic codes (from a laboratory information system like MOLIS or GLIMS) to a (trivial) antibiotic name or ATC code, or vice versa. This uses the data from \code{\link{antibiotics}}.
|
||||
Convert antibiotic codes to a (trivial) antibiotic name or ATC code, or vice versa. This uses the data from \code{\link{antibiotics}}.
|
||||
}
|
||||
\examples{
|
||||
abname("AMCL")
|
||||
# "amoxicillin and enzyme inhibitor"
|
||||
# "Amoxicillin and beta-lactamase inhibitor"
|
||||
|
||||
# It is quite flexible at default (having `from = "guess"`)
|
||||
abname(c("amox", "J01CA04", "Trimox", "dispermox", "Amoxil"))
|
||||
@ -47,6 +47,10 @@ abname("AMCL", to = "atc")
|
||||
# specific codes for University Medical Center Groningen (UMCG):
|
||||
abname("J01CR02", from = "atc", to = "umcg")
|
||||
# "AMCL"
|
||||
|
||||
# specific codes for Certe:
|
||||
abname("J01CR02", from = "atc", to = "certe")
|
||||
# "amcl"
|
||||
}
|
||||
\keyword{ab}
|
||||
\keyword{antibiotics}
|
||||
|
@ -7,7 +7,7 @@
|
||||
\format{A data.frame with 420 observations and 18 variables:
|
||||
\describe{
|
||||
\item{\code{atc}}{ATC code, like \code{J01CR02}}
|
||||
\item{\code{molis}}{MOLIS code, like \code{amcl}}
|
||||
\item{\code{certe}}{Certe code, like \code{amcl}}
|
||||
\item{\code{umcg}}{UMCG code, like \code{AMCL}}
|
||||
\item{\code{abbr}}{Abbreviation as used by many countries, to be used for \code{\link{guess_atc}}}
|
||||
\item{\code{official}}{Official name by the WHO, like \code{"Amoxicillin and enzyme inhibitor"}}
|
||||
|
30
man/guess_atc.Rd → man/as.atc.Rd
Executable file → Normal file
30
man/guess_atc.Rd → man/as.atc.Rd
Executable file → Normal file
@ -1,35 +1,43 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/atc.R
|
||||
\name{guess_atc}
|
||||
\name{as.atc}
|
||||
\alias{as.atc}
|
||||
\alias{atc}
|
||||
\alias{guess_atc}
|
||||
\alias{is.atc}
|
||||
\title{Find ATC code based on antibiotic property}
|
||||
\usage{
|
||||
as.atc(x)
|
||||
|
||||
guess_atc(x)
|
||||
|
||||
is.atc(x)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{character vector to determine \code{ATC} code}
|
||||
}
|
||||
\value{
|
||||
Character (vector).
|
||||
Character (vector) with class \code{"act"}. Unknown values will return \code{NA}.
|
||||
}
|
||||
\description{
|
||||
Use this function to determine the ATC code of one or more antibiotics. The dataset \code{\link{antibiotics}} will be searched for abbreviations, official names and trade names.
|
||||
}
|
||||
\details{
|
||||
In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
Source: \url{https://www.whocc.no/atc/structure_and_principles/}
|
||||
}
|
||||
\examples{
|
||||
# These examples all return "J01FA01", the ATC code of Erythromycin:
|
||||
guess_atc("J01FA01")
|
||||
guess_atc("Erythromycin")
|
||||
guess_atc("eryt")
|
||||
guess_atc("ERYT")
|
||||
guess_atc("ERY")
|
||||
guess_atc("Erythrocin") # Trade name
|
||||
guess_atc("Eryzole") # Trade name
|
||||
guess_atc("Pediamycin") # Trade name
|
||||
as.atc("J01FA01")
|
||||
as.atc("Erythromycin")
|
||||
as.atc("eryt")
|
||||
as.atc("ERYT")
|
||||
as.atc("ERY")
|
||||
as.atc("Erythrocin") # Trade name
|
||||
as.atc("Eryzole") # Trade name
|
||||
as.atc("Pediamycin") # Trade name
|
||||
}
|
||||
\seealso{
|
||||
\code{\link{antibiotics}} for the dataframe that is being used to determine ATC's.
|
||||
}
|
||||
\keyword{atc}
|
@ -1,5 +1,5 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/classes.R
|
||||
% Please edit documentation in R/mic.R
|
||||
\name{as.mic}
|
||||
\alias{as.mic}
|
||||
\alias{is.mic}
|
||||
|
@ -1,5 +1,5 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/classes.R
|
||||
% Please edit documentation in R/rsi.R
|
||||
\name{as.rsi}
|
||||
\alias{as.rsi}
|
||||
\alias{is.rsi}
|
||||
|
27
man/atc.property.Rd
Normal file
27
man/atc.property.Rd
Normal file
@ -0,0 +1,27 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/atc.R
|
||||
\name{atc.property}
|
||||
\alias{atc.property}
|
||||
\alias{atc.official}
|
||||
\alias{atc.official_nl}
|
||||
\alias{atc.trivial_nl}
|
||||
\alias{atc.certe}
|
||||
\alias{atc.umcg}
|
||||
\title{Get antibiotic property based on ATC}
|
||||
\usage{
|
||||
atc.official(atc)
|
||||
|
||||
atc.official_nl(atc)
|
||||
|
||||
atc.trivial_nl(atc)
|
||||
|
||||
atc.certe(atc)
|
||||
|
||||
atc.umcg(atc)
|
||||
}
|
||||
\arguments{
|
||||
\item{atc}{a valid ATC code, created with \code{\link{as.atc}}}
|
||||
}
|
||||
\description{
|
||||
Use these functions to return a specific property of an antibiotic from the \code{\link{antibiotics}} data set, based on their ATC code.
|
||||
}
|
42
man/bactid.property.Rd
Normal file
42
man/bactid.property.Rd
Normal file
@ -0,0 +1,42 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bactid.R
|
||||
\name{bactid.property}
|
||||
\alias{bactid.property}
|
||||
\alias{bactid.family}
|
||||
\alias{bactid.genus}
|
||||
\alias{bactid.species}
|
||||
\alias{bactid.subspecies}
|
||||
\alias{bactid.fullname}
|
||||
\alias{bactid.type}
|
||||
\alias{bactid.gramstain}
|
||||
\alias{bactid.aerobic}
|
||||
\alias{bactid.type_nl}
|
||||
\alias{bactid.gramstain_nl}
|
||||
\title{Get microbial property based on `bactid`}
|
||||
\usage{
|
||||
bactid.family(bactid)
|
||||
|
||||
bactid.genus(bactid)
|
||||
|
||||
bactid.species(bactid)
|
||||
|
||||
bactid.subspecies(bactid)
|
||||
|
||||
bactid.fullname(bactid)
|
||||
|
||||
bactid.type(bactid)
|
||||
|
||||
bactid.gramstain(bactid)
|
||||
|
||||
bactid.aerobic(bactid)
|
||||
|
||||
bactid.type_nl(bactid)
|
||||
|
||||
bactid.gramstain_nl(bactid)
|
||||
}
|
||||
\arguments{
|
||||
\item{bactid}{a valid bactid code, created with \code{\link{as.bactid}}}
|
||||
}
|
||||
\description{
|
||||
Use these functions to return a specific property of a microorganism from the \code{\link{microorganisms}} data set, based on their \code{bactid}. Get such an ID with \code{\link{as.bactid}}.
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/eucast.R
|
||||
\name{mo_property}
|
||||
\alias{mo_property}
|
||||
\title{Poperties of a microorganism}
|
||||
\usage{
|
||||
mo_property(bactid, property = "fullname")
|
||||
}
|
||||
\arguments{
|
||||
\item{bactid}{ID of a microorganisme, like \code{"STAAUR} and \code{"ESCCOL}}
|
||||
|
||||
\item{property}{One of the values \code{bactid}, \code{bactsys}, \code{family}, \code{genus}, \code{species}, \code{subspecies}, \code{fullname}, \code{type}, \code{gramstain}, \code{aerobic}}
|
||||
}
|
||||
\description{
|
||||
Poperties of a microorganism
|
||||
}
|
||||
\seealso{
|
||||
\code{\link{microorganisms}}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/rsi.R
|
||||
% Please edit documentation in R/portion.R
|
||||
\name{rsi}
|
||||
\alias{rsi}
|
||||
\title{Calculate resistance of isolates}
|
||||
|
Reference in New Issue
Block a user