mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 08:22:04 +02:00
(v1.5.0.9006) major documentation update
This commit is contained in:
@ -3,20 +3,20 @@
|
||||
\name{AMR-deprecated}
|
||||
\alias{AMR-deprecated}
|
||||
\alias{p_symbol}
|
||||
\title{Deprecated functions}
|
||||
\title{Deprecated Functions}
|
||||
\usage{
|
||||
p_symbol(p, emptychar = " ")
|
||||
}
|
||||
\description{
|
||||
These functions are so-called '\link{Deprecated}'. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by (if there is one).
|
||||
}
|
||||
\section{Retired lifecycle}{
|
||||
\section{Retired Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -33,12 +33,12 @@ This package can be used for:
|
||||
\item Principal component analysis for AMR
|
||||
}
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
|
||||
\strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.}
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{WHONET}
|
||||
\alias{WHONET}
|
||||
\title{Data set with 500 isolates - WHONET example}
|
||||
\title{Data Set with 500 Isolates - WHONET Example}
|
||||
\format{
|
||||
A \link{data.frame} with 500 observations and 53 variables:
|
||||
\itemize{
|
||||
@ -41,12 +41,12 @@ WHONET
|
||||
\description{
|
||||
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antibiotic results are from our \link{example_isolates} data set. All patient names are created using online surname generators and are only in place for practice purposes.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/ab_from_text.R
|
||||
\name{ab_from_text}
|
||||
\alias{ab_from_text}
|
||||
\title{Retrieve antimicrobial drug names and doses from clinical text}
|
||||
\title{Retrieve Antimicrobial Drug Names and Doses from Clinical Text}
|
||||
\usage{
|
||||
ab_from_text(
|
||||
text,
|
||||
@ -54,13 +54,13 @@ With using \code{collapse}, this function will return a \link{character}:\cr
|
||||
\code{df \%>\% mutate(abx = ab_from_text(clinical_text, collapse = "|"))}
|
||||
}
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
\alias{ab_ddd}
|
||||
\alias{ab_info}
|
||||
\alias{ab_url}
|
||||
\title{Get properties of an antibiotic}
|
||||
\title{Get Properties of an Antibiotic}
|
||||
\usage{
|
||||
ab_name(x, language = get_locale(), tolower = FALSE, ...)
|
||||
|
||||
@ -54,7 +54,7 @@ ab_property(x, property = "name", language = get_locale(), ...)
|
||||
|
||||
\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{units}{a logical to indicate whether the units instead of the DDDs itself must be returned, see \emph{Examples}}
|
||||
|
||||
\item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}}
|
||||
|
||||
@ -76,7 +76,7 @@ All output will be \link{translate}d where possible.
|
||||
|
||||
The function \code{\link[=ab_url]{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.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -93,12 +93,12 @@ 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{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/age.R
|
||||
\name{age}
|
||||
\alias{age}
|
||||
\title{Age in years of individuals}
|
||||
\title{Age in Years of Individuals}
|
||||
\usage{
|
||||
age(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...)
|
||||
}
|
||||
@ -26,7 +26,7 @@ Calculates age in years based on a reference date, which is the sytem date at de
|
||||
\details{
|
||||
Ages below 0 will be returned as \code{NA} with a warning. Ages above 120 will only give a warning.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -34,7 +34,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,14 +2,14 @@
|
||||
% Please edit documentation in R/age.R
|
||||
\name{age_groups}
|
||||
\alias{age_groups}
|
||||
\title{Split ages into age groups}
|
||||
\title{Split Ages into Age Groups}
|
||||
\usage{
|
||||
age_groups(x, split_at = c(12, 25, 55, 75), na.rm = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{age, e.g. calculated with \code{\link[=age]{age()}}}
|
||||
|
||||
\item{split_at}{values to split \code{x} at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See Details.}
|
||||
\item{split_at}{values to split \code{x} at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See \emph{Details}.}
|
||||
|
||||
\item{na.rm}{a \link{logical} to indicate whether missing values should be removed}
|
||||
}
|
||||
@ -33,7 +33,7 @@ The default is to split on young children (0-11), youth (12-24), young adults (2
|
||||
}
|
||||
}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -41,7 +41,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
\alias{macrolides}
|
||||
\alias{penicillins}
|
||||
\alias{tetracyclines}
|
||||
\title{Antibiotic class selectors}
|
||||
\title{Antibiotic Class Selectors}
|
||||
\usage{
|
||||
ab_class(ab_class)
|
||||
|
||||
@ -57,12 +57,20 @@ These functions help to select the columns of antibiotics that are of a specific
|
||||
|
||||
All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
}
|
||||
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\name{antibiotics}
|
||||
\alias{antibiotics}
|
||||
\alias{antivirals}
|
||||
\title{Data sets with 558 antimicrobials}
|
||||
\title{Data Sets with 558 Antimicrobials}
|
||||
\format{
|
||||
\subsection{For the \link{antibiotics} data set: a \link{data.frame} with 456 observations and 14 variables:}{
|
||||
\itemize{
|
||||
@ -75,7 +75,7 @@ Files in \R format (with preserved data structure) can be found here:
|
||||
}
|
||||
}
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
@ -92,7 +92,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
|
||||
\strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.}
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
10
man/as.ab.Rd
10
man/as.ab.Rd
@ -4,7 +4,7 @@
|
||||
\alias{as.ab}
|
||||
\alias{ab}
|
||||
\alias{is.ab}
|
||||
\title{Transform input to an antibiotic ID}
|
||||
\title{Transform Input to an Antibiotic ID}
|
||||
\usage{
|
||||
as.ab(x, flag_multiple_results = TRUE, info = TRUE, ...)
|
||||
|
||||
@ -36,7 +36,7 @@ All these properties will be searched for the user input. The \code{\link[=as.ab
|
||||
\item Digitalised paper records, leaving artefacts like 0/o/O (zero and O's), B/8, n/r, etc.
|
||||
}
|
||||
|
||||
Use the \code{\link[=ab_property]{ab_*}} functions to get properties based on the returned antibiotic ID, see Examples.
|
||||
Use the \code{\link[=ab_property]{ab_*}} functions to get properties based on the returned antibiotic ID, see \emph{Examples}.
|
||||
|
||||
Note: the \code{\link[=as.ab]{as.ab()}} and \code{\link[=ab_property]{ab_*}} functions may use very long regular expression to match brand names of antimicrobial agents. This may fail on some systems.
|
||||
}
|
||||
@ -49,7 +49,7 @@ 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{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -69,12 +69,12 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun
|
||||
\strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.}
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{as.disk}
|
||||
\alias{disk}
|
||||
\alias{is.disk}
|
||||
\title{Transform input to disk diffusion diameters}
|
||||
\title{Transform Input to Disk Diffusion Diameters}
|
||||
\usage{
|
||||
as.disk(x, na.rm = FALSE)
|
||||
|
||||
@ -24,7 +24,7 @@ This transforms a vector to a new class \code{\link{disk}}, which is a disk diff
|
||||
\details{
|
||||
Interpret disk values as RSI values with \code{\link[=as.rsi]{as.rsi()}}. It supports guidelines from EUCAST and CLSI.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -32,7 +32,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{as.mic}
|
||||
\alias{mic}
|
||||
\alias{is.mic}
|
||||
\title{Transform input to minimum inhibitory concentrations (MIC)}
|
||||
\title{Transform Input to Minimum Inhibitory Concentrations (MIC)}
|
||||
\usage{
|
||||
as.mic(x, na.rm = FALSE)
|
||||
|
||||
@ -24,7 +24,7 @@ This transforms a vector to a new class \code{\link{mic}}, which is an ordered \
|
||||
\details{
|
||||
To interpret MIC values as RSI values, use \code{\link[=as.rsi]{as.rsi()}} on MIC values. It supports guidelines from EUCAST and CLSI.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -32,7 +32,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
26
man/as.mo.Rd
26
man/as.mo.Rd
@ -7,7 +7,7 @@
|
||||
\alias{mo_failures}
|
||||
\alias{mo_uncertainties}
|
||||
\alias{mo_renamed}
|
||||
\title{Transform input to a microorganism ID}
|
||||
\title{Transform Input to a Microorganism ID}
|
||||
\usage{
|
||||
as.mo(
|
||||
x,
|
||||
@ -39,7 +39,7 @@ This excludes \emph{Staphylococcus aureus} at default, use \code{Becker = "all"}
|
||||
|
||||
This excludes \emph{Enterococci} at default (who are in group D), use \code{Lancefield = "all"} to also categorise all \emph{Enterococci} as group D.}
|
||||
|
||||
\item{allow_uncertain}{a number between \code{0} (or \code{"none"}) and \code{3} (or \code{"all"}), or \code{TRUE} (= \code{2}) or \code{FALSE} (= \code{0}) to indicate whether the input should be checked for less probable results, please see \emph{Details}}
|
||||
\item{allow_uncertain}{a number between \code{0} (or \code{"none"}) and \code{3} (or \code{"all"}), or \code{TRUE} (= \code{2}) or \code{FALSE} (= \code{0}) to indicate whether the input should be checked for less probable results, see \emph{Details}}
|
||||
|
||||
\item{reference_df}{a \link{data.frame} to be used for extra reference when translating \code{x} to a valid \code{\link{mo}}. See \code{\link[=set_mo_source]{set_mo_source()}} and \code{\link[=get_mo_source]{get_mo_source()}} to automate the usage of your own codes (e.g. used in your analysis or organisation).}
|
||||
|
||||
@ -53,10 +53,10 @@ This excludes \emph{Enterococci} at default (who are in group D), use \code{Lanc
|
||||
A \link{character} \link{vector} with additional class \code{\link{mo}}
|
||||
}
|
||||
\description{
|
||||
Use this function to determine a valid microorganism ID (\code{\link{mo}}). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (such as \code{"S. aureus"}), an abbreviation known in the field (such as \code{"MRSA"}), or just a genus. Please see \emph{Examples}.
|
||||
Use this function to determine a valid microorganism ID (\code{\link{mo}}). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see \emph{Source}). The input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (such as \code{"S. aureus"}), an abbreviation known in the field (such as \code{"MRSA"}), or just a genus. See \emph{Examples}.
|
||||
}
|
||||
\details{
|
||||
\subsection{General info}{
|
||||
\subsection{General Info}{
|
||||
|
||||
A microorganism ID from this package (class: \code{\link{mo}}) is human readable and typically looks like these examples:\preformatted{ Code Full name
|
||||
--------------- --------------------------------------
|
||||
@ -74,7 +74,7 @@ A microorganism ID from this package (class: \code{\link{mo}}) is human readable
|
||||
|
||||
Values that cannot be coerced will be considered 'unknown' and will get the MO code \code{UNKNOWN}.
|
||||
|
||||
Use the \code{\link[=mo_property]{mo_*}} functions to get properties based on the returned code, see Examples.
|
||||
Use the \code{\link[=mo_property]{mo_*}} functions to get properties based on the returned code, see \emph{Examples}.
|
||||
|
||||
The algorithm uses data from the Catalogue of Life (see below) and from one other source (see \link{microorganisms}).
|
||||
|
||||
@ -88,7 +88,7 @@ The \code{\link[=as.mo]{as.mo()}} function uses several coercion rules for fast
|
||||
This will lead to the effect that e.g. \code{"E. coli"} (a microorganism highly prevalent in humans) will return the microbial ID of \emph{Escherichia coli} and not \emph{Entamoeba coli} (a microorganism less prevalent in humans), although the latter would alphabetically come first.
|
||||
}
|
||||
|
||||
\subsection{Coping with uncertain results}{
|
||||
\subsection{Coping with Uncertain Results}{
|
||||
|
||||
In addition, the \code{\link[=as.mo]{as.mo()}} function can differentiate four levels of uncertainty to guess valid results:
|
||||
\itemize{
|
||||
@ -109,15 +109,15 @@ With the default setting (\code{allow_uncertain = TRUE}, level 2), below example
|
||||
|
||||
There are three helper functions that can be run after using the \code{\link[=as.mo]{as.mo()}} function:
|
||||
\itemize{
|
||||
\item Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Background on matching score}).
|
||||
\item Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Matching Score for Microorganisms} below).
|
||||
\item Use \code{\link[=mo_failures]{mo_failures()}} to get a \link{character} \link{vector} with all values that could not be coerced to a valid value.
|
||||
\item Use \code{\link[=mo_renamed]{mo_renamed()}} to get a \link{data.frame} with all values that could be coerced based on old, previously accepted taxonomic names.
|
||||
}
|
||||
}
|
||||
|
||||
\subsection{Microbial prevalence of pathogens in humans}{
|
||||
\subsection{Microbial Prevalence of Pathogens in Humans}{
|
||||
|
||||
The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the \code{prevalence} columns in the \link{microorganisms} and \link{microorganisms.old} data sets. The grouping into human pathogenic prevalence is explained in the section \emph{Matching score for microorganisms} below.
|
||||
The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the \code{prevalence} columns in the \link{microorganisms} and \link{microorganisms.old} data sets. The grouping into human pathogenic prevalence is explained in the section \emph{Matching Score for Microorganisms} below.
|
||||
}
|
||||
}
|
||||
\section{Source}{
|
||||
@ -131,7 +131,7 @@ The intelligent rules consider the prevalence of microorganisms in humans groupe
|
||||
}
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -139,7 +139,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Matching score for microorganisms}{
|
||||
\section{Matching Score for Microorganisms}{
|
||||
|
||||
With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as:
|
||||
|
||||
@ -168,12 +168,12 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
\alias{as.rsi.mic}
|
||||
\alias{as.rsi.disk}
|
||||
\alias{as.rsi.data.frame}
|
||||
\title{Interpret MIC and disk values, or clean raw R/SI data}
|
||||
\title{Interpret MIC and Disk Values, or Clean Raw R/SI Data}
|
||||
\usage{
|
||||
as.rsi(x, ...)
|
||||
|
||||
@ -55,13 +55,13 @@ is.rsi.eligible(x, threshold = 0.05)
|
||||
|
||||
\item{...}{for using on a \link{data.frame}: names of columns to apply \code{\link[=as.rsi]{as.rsi()}} on (supports tidy selection like \code{AMX:VAN}). Otherwise: arguments passed on to methods.}
|
||||
|
||||
\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, please see \emph{Examples}}
|
||||
\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, see \emph{Examples}}
|
||||
|
||||
\item{mo}{any (vector of) text that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}, will be determined automatically if the \code{dplyr} package is installed}
|
||||
|
||||
\item{ab}{any (vector of) text that can be coerced to a valid antimicrobial code with \code{\link[=as.ab]{as.ab()}}}
|
||||
|
||||
\item{guideline}{defaults to the latest included EUCAST guideline, see Details for all options}
|
||||
\item{guideline}{defaults to the latest included EUCAST guideline, see \emph{Details} for all options}
|
||||
|
||||
\item{uti}{(Urinary Tract Infection) A vector with \link{logical}s (\code{TRUE} or \code{FALSE}) to specify whether a UTI specific interpretation from the guideline should be chosen. For using \code{\link[=as.rsi]{as.rsi()}} on a \link{data.frame}, this can also be a column containing \link{logical}s or when left blank, the data set will be searched for a 'specimen' and rows containing 'urin' (such as 'urine', 'urina') in that column will be regarded isolates from a UTI. See \emph{Examples}.}
|
||||
|
||||
@ -80,7 +80,7 @@ Ordered \link{factor} with new class \code{\link{rsi}}
|
||||
Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class \code{\link{rsi}}, which is an ordered factor with levels \verb{S < I < R}. Values that cannot be interpreted will be returned as \code{NA} with a warning.
|
||||
}
|
||||
\details{
|
||||
\subsection{How it works}{
|
||||
\subsection{How it Works}{
|
||||
|
||||
The \code{\link[=as.rsi]{as.rsi()}} function works in four ways:
|
||||
\enumerate{
|
||||
@ -102,21 +102,21 @@ your_data \%>\% mutate(across(where(is.disk), as.rsi)) # since dplyr 1.0.0
|
||||
}
|
||||
}
|
||||
|
||||
\subsection{Supported guidelines}{
|
||||
\subsection{Supported Guidelines}{
|
||||
|
||||
For interpreting MIC values as well as disk diffusion diameters, supported guidelines to be used as input for the \code{guideline} argument are: "CLSI 2010", "CLSI 2011", "CLSI 2012", "CLSI 2013", "CLSI 2014", "CLSI 2015", "CLSI 2016", "CLSI 2017", "CLSI 2018", "CLSI 2019", "EUCAST 2011", "EUCAST 2012", "EUCAST 2013", "EUCAST 2014", "EUCAST 2015", "EUCAST 2016", "EUCAST 2017", "EUCAST 2018", "EUCAST 2019", "EUCAST 2020", "EUCAST 2021".
|
||||
|
||||
Simply using \code{"CLSI"} or \code{"EUCAST"} as input will automatically select the latest version of that guideline. You can set your own data set using the \code{reference_data} argument. The \code{guideline} argument will then be ignored.
|
||||
}
|
||||
|
||||
\subsection{After interpretation}{
|
||||
\subsection{After Interpretation}{
|
||||
|
||||
After using \code{\link[=as.rsi]{as.rsi()}}, you can use the \code{\link[=eucast_rules]{eucast_rules()}} defined by EUCAST to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.
|
||||
}
|
||||
|
||||
\subsection{Machine readable interpretation guidelines}{
|
||||
\subsection{Machine-Readable Interpretation Guidelines}{
|
||||
|
||||
The repository of this package \href{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}{contains a machine readable version} of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. \strong{This allows for easy implementation of these rules in laboratory information systems (LIS)}. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
|
||||
The repository of this package \href{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}{contains a machine-readable version} of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. \strong{This allows for easy implementation of these rules in laboratory information systems (LIS)}. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
|
||||
}
|
||||
|
||||
\subsection{Other}{
|
||||
@ -139,7 +139,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th
|
||||
This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates.
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -147,12 +147,12 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{atc_online_property}
|
||||
\alias{atc_online_groups}
|
||||
\alias{atc_online_ddd}
|
||||
\title{Get ATC properties from WHOCC website}
|
||||
\title{Get ATC Properties from WHOCC Website}
|
||||
\source{
|
||||
\url{https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/}
|
||||
}
|
||||
@ -24,9 +24,9 @@ atc_online_ddd(atc_code, ...)
|
||||
\arguments{
|
||||
\item{atc_code}{a character or character vector with ATC code(s) of antibiotic(s)}
|
||||
|
||||
\item{property}{property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.}
|
||||
\item{property}{property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see \emph{Examples}.}
|
||||
|
||||
\item{administration}{type of administration when using \code{property = "Adm.R"}, see Details}
|
||||
\item{administration}{type of administration when using \code{property = "Adm.R"}, see \emph{Details}}
|
||||
|
||||
\item{url}{url of website of the WHOCC. The sign \verb{\%s} can be used as a placeholder for ATC codes.}
|
||||
|
||||
@ -66,7 +66,7 @@ Abbreviations of return values when using \code{property = "U"} (unit):
|
||||
|
||||
\strong{N.B. This function requires an internet connection and only works if the following packages are installed: \code{curl}, \code{rvest}, \code{xml2}.}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -74,7 +74,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/availability.R
|
||||
\name{availability}
|
||||
\alias{availability}
|
||||
\title{Check availability of columns}
|
||||
\title{Check Availability of Columns}
|
||||
\usage{
|
||||
availability(tbl, width = NULL)
|
||||
}
|
||||
@ -20,7 +20,7 @@ Easy check for data availability of all columns in a data set. This makes it eas
|
||||
\details{
|
||||
The function returns a \link{data.frame} with columns \code{"resistant"} and \code{"visual_resistance"}. The values in that columns are calculated with \code{\link[=resistance]{resistance()}}.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -28,7 +28,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\name{bug_drug_combinations}
|
||||
\alias{bug_drug_combinations}
|
||||
\alias{format.bug_drug_combinations}
|
||||
\title{Determine bug-drug combinations}
|
||||
\title{Determine Bug-Drug Combinations}
|
||||
\source{
|
||||
\strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
|
||||
}
|
||||
@ -37,7 +37,7 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...)
|
||||
|
||||
\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.}
|
||||
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.}
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.}
|
||||
|
||||
\item{combine_SI}{a logical to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument \code{combine_IR}, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is \code{TRUE}.}
|
||||
|
||||
@ -58,12 +58,12 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...)
|
||||
The function \code{\link[=bug_drug_combinations]{bug_drug_combinations()}} returns a \link{data.frame} with columns "mo", "ab", "S", "I", "R" and "total".
|
||||
}
|
||||
\description{
|
||||
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{\link[=format]{format()}} on the result to prettify it to a publicable/printable format, see Examples.
|
||||
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{\link[=format]{format()}} on the result to prettify it to a publicable/printable format, see \emph{Examples}.
|
||||
}
|
||||
\details{
|
||||
The function \code{\link[=format]{format()}} calculates the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -71,7 +71,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Included taxa}{
|
||||
\section{Included Taxa}{
|
||||
|
||||
Included are:
|
||||
\itemize{
|
||||
@ -31,7 +31,7 @@ The Catalogue of Life (\url{http://www.catalogueoflife.org}) is the most compreh
|
||||
The syntax used to transform the original data to a cleansed \R format, can be found here: \url{https://github.com/msberends/AMR/blob/master/data-raw/reproduction_of_microorganisms.R}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
12
man/count.Rd
12
man/count.Rd
@ -12,7 +12,7 @@
|
||||
\alias{count_all}
|
||||
\alias{n_rsi}
|
||||
\alias{count_df}
|
||||
\title{Count available isolates}
|
||||
\title{Count Available Isolates}
|
||||
\usage{
|
||||
count_resistant(..., only_all_tested = FALSE)
|
||||
|
||||
@ -43,7 +43,7 @@ count_df(
|
||||
\arguments{
|
||||
\item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed.}
|
||||
|
||||
\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination therapy} below}
|
||||
\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination Therapy} below}
|
||||
|
||||
\item{data}{a \link{data.frame} containing columns with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}})}
|
||||
|
||||
@ -59,7 +59,7 @@ count_df(
|
||||
An \link{integer}
|
||||
}
|
||||
\description{
|
||||
These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, please see \emph{Examples}.
|
||||
These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, see \emph{Examples}.
|
||||
|
||||
\code{\link[=count_resistant]{count_resistant()}} should be used to count resistant isolates, \code{\link[=count_susceptible]{count_susceptible()}} should be used to count susceptible isolates.
|
||||
}
|
||||
@ -72,7 +72,7 @@ The function \code{\link[=n_rsi]{n_rsi()}} is an alias of \code{\link[=count_all
|
||||
|
||||
The function \code{\link[=count_df]{count_df()}} takes any variable from \code{data} that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) and counts the number of S's, I's and R's. It also supports grouped variables. The function \code{\link[=rsi_df]{rsi_df()}} works exactly like \code{\link[=count_df]{count_df()}}, but adds the percentage of S, I and R.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -95,7 +95,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th
|
||||
This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates.
|
||||
}
|
||||
|
||||
\section{Combination therapy}{
|
||||
\section{Combination Therapy}{
|
||||
|
||||
When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI:\preformatted{--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
@ -126,7 +126,7 @@ and that, in combination therapies, for \code{only_all_tested = FALSE} applies t
|
||||
Using \code{only_all_tested} has no impact when only using one antibiotic as input.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{dosage}
|
||||
\alias{dosage}
|
||||
\title{Data set with treatment dosages as defined by EUCAST}
|
||||
\title{Data Set with Treatment Dosages as Defined by EUCAST}
|
||||
\format{
|
||||
A \link{data.frame} with 135 observations and 9 variables:
|
||||
\itemize{
|
||||
@ -27,12 +27,12 @@ EUCAST breakpoints used in this package are based on the dosages in this data se
|
||||
\details{
|
||||
\href{https://www.eucast.org/clinical_breakpoints/}{'EUCAST Clinical Breakpoint Tables' v11.0} (2021) are based on the dosages in this data set.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{example_isolates}
|
||||
\alias{example_isolates}
|
||||
\title{Data set with 2,000 example isolates}
|
||||
\title{Data Set with 2,000 Example Isolates}
|
||||
\format{
|
||||
A \link{data.frame} with 2,000 observations and 49 variables:
|
||||
\itemize{
|
||||
@ -25,12 +25,12 @@ example_isolates
|
||||
\description{
|
||||
A data set containing 2,000 microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR analysis. For examples, please read \href{https://msberends.github.io/AMR/articles/AMR.html}{the tutorial on our website}.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{example_isolates_unclean}
|
||||
\alias{example_isolates_unclean}
|
||||
\title{Data set with unclean data}
|
||||
\title{Data Set with Unclean Data}
|
||||
\format{
|
||||
A \link{data.frame} with 3,000 observations and 8 variables:
|
||||
\itemize{
|
||||
@ -20,12 +20,12 @@ example_isolates_unclean
|
||||
\description{
|
||||
A data set containing 3,000 microbial isolates that are not cleaned up and consequently not ready for AMR analysis. This data set can be used for practice.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
\alias{filter_macrolides}
|
||||
\alias{filter_penicillins}
|
||||
\alias{filter_tetracyclines}
|
||||
\title{Filter isolates on result in antimicrobial class}
|
||||
\title{Filter Isolates on Result in Antimicrobial Class}
|
||||
\usage{
|
||||
filter_ab_class(x, ab_class, result = NULL, scope = "any", ...)
|
||||
|
||||
@ -62,7 +62,7 @@ Filter isolates on results in specific antimicrobial classes. This makes it easy
|
||||
\details{
|
||||
All columns of \code{x} will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a filter function like e.g. \code{\link[=filter_aminoglycosides]{filter_aminoglycosides()}} will include column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{first_isolate}
|
||||
\alias{filter_first_isolate}
|
||||
\alias{filter_first_weighted_isolate}
|
||||
\title{Determine first (weighted) isolates}
|
||||
\title{Determine First (Weighted) Isolates}
|
||||
\source{
|
||||
Methodology of this function is strictly based on:
|
||||
|
||||
@ -64,9 +64,9 @@ filter_first_weighted_isolate(
|
||||
|
||||
\item{col_icu}{column name of the logicals (\code{TRUE}/\code{FALSE}) whether a ward or department is an Intensive Care Unit (ICU)}
|
||||
|
||||
\item{col_keyantibiotics}{column name of the key antibiotics to determine first \emph{weighted} isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this.}
|
||||
\item{col_keyantibiotics}{column name of the key antibiotics to determine first (weighted) isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this.}
|
||||
|
||||
\item{episode_days}{episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see Source.}
|
||||
\item{episode_days}{episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see \emph{Source}.}
|
||||
|
||||
\item{testcodes_exclude}{character vector with test codes that should be excluded (case-insensitive)}
|
||||
|
||||
@ -74,11 +74,11 @@ filter_first_weighted_isolate(
|
||||
|
||||
\item{specimen_group}{value in the column set with \code{col_specimen} to filter on}
|
||||
|
||||
\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see Details}
|
||||
\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see \emph{Details}}
|
||||
|
||||
\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see Details}
|
||||
\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see \emph{Details}}
|
||||
|
||||
\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see Details}
|
||||
\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see \emph{Details}}
|
||||
|
||||
\item{info}{print progress}
|
||||
|
||||
@ -93,17 +93,17 @@ A \code{\link{logical}} vector
|
||||
Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use \code{\link[=is_new_episode]{is_new_episode()}} that also supports grouping with the \code{dplyr} package.
|
||||
}
|
||||
\details{
|
||||
These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}.
|
||||
These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}.
|
||||
|
||||
The \code{\link[=first_isolate]{first_isolate()}} function is a wrapper around the \code{\link[=is_new_episode]{is_new_episode()}} function, but more efficient for data sets containing microorganism codes or names.
|
||||
|
||||
All isolates with a microbial ID of \code{NA} will be excluded as first isolate.
|
||||
\subsection{Why this is so important}{
|
||||
\subsection{Why this is so Important}{
|
||||
|
||||
To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode \href{https://pubmed.ncbi.nlm.nih.gov/17304462/}{(Hindler \emph{et al.} 2007)}. If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all \emph{S. aureus} isolates would be overestimated, because you included this MRSA more than once. It would be \href{https://en.wikipedia.org/wiki/Selection_bias}{selection bias}.
|
||||
}
|
||||
|
||||
\subsection{\verb{filter_*()} shortcuts}{
|
||||
\subsection{\verb{filter_*()} Shortcuts}{
|
||||
|
||||
The functions \code{\link[=filter_first_isolate]{filter_first_isolate()}} and \code{\link[=filter_first_weighted_isolate]{filter_first_weighted_isolate()}} are helper functions to quickly filter on first isolates.
|
||||
|
||||
@ -121,9 +121,9 @@ The function \code{\link[=filter_first_weighted_isolate]{filter_first_weighted_i
|
||||
}
|
||||
}
|
||||
}
|
||||
\section{Key antibiotics}{
|
||||
\section{Key Antibiotics}{
|
||||
|
||||
There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results:
|
||||
There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
|
||||
\enumerate{
|
||||
\item Using \code{type = "keyantibiotics"} and argument \code{ignore_I}
|
||||
|
||||
@ -134,7 +134,7 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S
|
||||
}
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -142,7 +142,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ The p-value is computed from the asymptotic chi-squared distribution of the test
|
||||
In the contingency table case simulation is done by random sampling from the set of all contingency tables with given marginals, and works only if the marginals are strictly positive. Note that this is not the usual sampling situation assumed for a chi-squared test (such as the \emph{G}-test) but rather that for Fisher's exact test.
|
||||
|
||||
In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by \code{p}, each sample being of size \code{n = sum(x)}. This simulation is done in \R and may be slow.
|
||||
\subsection{\emph{G}-test of goodness-of-fit (likelihood ratio test)}{
|
||||
\subsection{\emph{G}-test Of Goodness-of-Fit (Likelihood Ratio Test)}{
|
||||
|
||||
Use the \emph{G}-test of goodness-of-fit when you have one nominal variable with two or more values (such as male and female, or red, pink and white flowers). You compare the observed counts of numbers of observations in each category with the expected counts, which you calculate using some kind of theoretical expectation (such as a 1:1 sex ratio or a 1:2:1 ratio in a genetic cross).
|
||||
|
||||
@ -70,7 +70,7 @@ If the expected number of observations in any category is too small, the \emph{G
|
||||
The \emph{G}-test of goodness-of-fit is an alternative to the chi-square test of goodness-of-fit (\code{\link[=chisq.test]{chisq.test()}}); each of these tests has some advantages and some disadvantages, and the results of the two tests are usually very similar.
|
||||
}
|
||||
|
||||
\subsection{\emph{G}-test of independence}{
|
||||
\subsection{\emph{G}-test of Independence}{
|
||||
|
||||
Use the \emph{G}-test of independence when you have two nominal variables, each with two or more possible values. You want to know whether the proportions for one variable are different among values of the other variable.
|
||||
|
||||
@ -81,7 +81,7 @@ Fisher's exact test (\code{\link[=fisher.test]{fisher.test()}}) is an \strong{ex
|
||||
The \emph{G}-test of independence is an alternative to the chi-square test of independence (\code{\link[=chisq.test]{chisq.test()}}), and they will give approximately the same results.
|
||||
}
|
||||
|
||||
\subsection{How the test works}{
|
||||
\subsection{How the Test Works}{
|
||||
|
||||
Unlike the exact test of goodness-of-fit (\code{\link[=fisher.test]{fisher.test()}}), the \emph{G}-test does not directly calculate the probability of obtaining the observed results or something more extreme. Instead, like almost all statistical tests, the \emph{G}-test has an intermediate step; it uses the data to calculate a test statistic that measures how far the observed data are from the null expectation. You then use a mathematical relationship, in this case the chi-square distribution, to estimate the probability of obtaining that value of the test statistic.
|
||||
|
||||
@ -97,13 +97,13 @@ where \code{df} are the degrees of freedom.
|
||||
If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use \emph{G}-tests for each category, of course.
|
||||
}
|
||||
}
|
||||
\section{Questioning lifecycle}{
|
||||
\section{Questioning Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\name{get_episode}
|
||||
\alias{get_episode}
|
||||
\alias{is_new_episode}
|
||||
\title{Determine (new) episodes for patients}
|
||||
\title{Determine (New) Episodes for Patients}
|
||||
\usage{
|
||||
get_episode(x, episode_days, ...)
|
||||
|
||||
@ -12,7 +12,7 @@ is_new_episode(x, episode_days, ...)
|
||||
\arguments{
|
||||
\item{x}{vector of dates (class \code{Date} or \code{POSIXt})}
|
||||
|
||||
\item{episode_days}{length of the required episode in days, please see \emph{Details}}
|
||||
\item{episode_days}{length of the required episode in days, see \emph{Details}}
|
||||
|
||||
\item{...}{arguments passed on to \code{\link[=as.Date]{as.Date()}}}
|
||||
}
|
||||
@ -32,7 +32,7 @@ The \code{\link[=first_isolate]{first_isolate()}} function is a wrapper around t
|
||||
|
||||
The \code{dplyr} package is not required for these functions to work, but these functions support \link[dplyr:group_by]{variable grouping} and work conveniently inside \code{dplyr} verbs such as \code{\link[dplyr:filter]{filter()}}, \code{\link[dplyr:mutate]{mutate()}} and \code{\link[dplyr:summarise]{summarise()}}.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -40,7 +40,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/ggplot_pca.R
|
||||
\name{ggplot_pca}
|
||||
\alias{ggplot_pca}
|
||||
\title{PCA biplot with \code{ggplot2}}
|
||||
\title{PCA Biplot with \code{ggplot2}}
|
||||
\source{
|
||||
The \code{\link[=ggplot_pca]{ggplot_pca()}} function is based on the \code{ggbiplot()} function from the \code{ggbiplot} package by Vince Vu, as found on GitHub: \url{https://github.com/vqv/ggbiplot} (retrieved: 2 March 2020, their latest commit: \href{https://github.com/vqv/ggbiplot/commit/7325e880485bea4c07465a0304c470608fffb5d9}{\code{7325e88}}; 12 February 2015).
|
||||
|
||||
@ -108,7 +108,7 @@ Produces a \code{ggplot2} variant of a so-called \href{https://en.wikipedia.org/
|
||||
\details{
|
||||
The colours for labels and points can be changed by adding another scale layer for colour, like \code{scale_colour_viridis_d()} or \code{scale_colour_brewer()}.
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
|
@ -8,7 +8,7 @@
|
||||
\alias{scale_rsi_colours}
|
||||
\alias{theme_rsi}
|
||||
\alias{labels_rsi_count}
|
||||
\title{AMR plots with \code{ggplot2}}
|
||||
\title{AMR Plots with \code{ggplot2}}
|
||||
\usage{
|
||||
ggplot_rsi(
|
||||
data,
|
||||
@ -93,7 +93,7 @@ labels_rsi_count(
|
||||
|
||||
\item{combine_IR}{a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see argument \code{combine_SI}.}
|
||||
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.}
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.}
|
||||
|
||||
\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.}
|
||||
|
||||
@ -124,7 +124,7 @@ Use these functions to create bar plots for antimicrobial resistance analysis. A
|
||||
}
|
||||
\details{
|
||||
At default, the names of antibiotics will be shown on the plots using \code{\link[=ab_name]{ab_name()}}. This can be set with the \code{translate_ab} argument. See \code{\link[=count_df]{count_df()}}.
|
||||
\subsection{The functions}{
|
||||
\subsection{The Functions}{
|
||||
|
||||
\code{\link[=geom_rsi]{geom_rsi()}} will take any variable from the data that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) using \code{\link[=rsi_df]{rsi_df()}} and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.
|
||||
|
||||
@ -138,16 +138,16 @@ At default, the names of antibiotics will be shown on the plots using \code{\lin
|
||||
|
||||
\code{\link[=labels_rsi_count]{labels_rsi_count()}} print datalabels on the bars with percentage and amount of isolates using \code{\link[ggplot2:geom_text]{ggplot2::geom_text()}}.
|
||||
|
||||
\code{\link[=ggplot_rsi]{ggplot_rsi()}} is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (\verb{\%>\%}). See Examples.
|
||||
\code{\link[=ggplot_rsi]{ggplot_rsi()}} is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (\verb{\%>\%}). See \emph{Examples}.
|
||||
}
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/guess_ab_col.R
|
||||
\name{guess_ab_col}
|
||||
\alias{guess_ab_col}
|
||||
\title{Guess antibiotic column}
|
||||
\title{Guess Antibiotic Column}
|
||||
\usage{
|
||||
guess_ab_col(x = NULL, search_string = NULL, verbose = FALSE)
|
||||
}
|
||||
@ -22,7 +22,7 @@ This tries to find a column name in a data set based on information from the \li
|
||||
\details{
|
||||
You can look for an antibiotic (trade) name or abbreviation and it will search \code{x} and the \link{antibiotics} data set for any column containing a name or code of that antibiotic. \strong{Longer columns names take precedence over shorter column names.}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -30,7 +30,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{intrinsic_resistant}
|
||||
\alias{intrinsic_resistant}
|
||||
\title{Data set with bacterial intrinsic resistance}
|
||||
\title{Data Set with Bacterial Intrinsic Resistance}
|
||||
\format{
|
||||
A \link{data.frame} with 93,892 observations and 2 variables:
|
||||
\itemize{
|
||||
@ -22,12 +22,12 @@ The repository of this \code{AMR} package contains a file comprising this exact
|
||||
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020).
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/isolate_identifier.R
|
||||
\name{isolate_identifier}
|
||||
\alias{isolate_identifier}
|
||||
\title{Create identifier of an isolate}
|
||||
\title{Create Identifier of an Isolate}
|
||||
\usage{
|
||||
isolate_identifier(x, col_mo = NULL, cols_ab = NULL)
|
||||
}
|
||||
@ -16,13 +16,13 @@ isolate_identifier(x, col_mo = NULL, cols_ab = NULL)
|
||||
\description{
|
||||
This function will paste the microorganism code with all antimicrobial results into one string for each row in a data set. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available.
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
\alias{full_join_microorganisms}
|
||||
\alias{semi_join_microorganisms}
|
||||
\alias{anti_join_microorganisms}
|
||||
\title{Join \link{microorganisms} to a data set}
|
||||
\title{Join \link{microorganisms} to a Data Set}
|
||||
\usage{
|
||||
inner_join_microorganisms(x, by = NULL, suffix = c("2", ""), ...)
|
||||
|
||||
@ -40,7 +40,7 @@ Join the data set \link{microorganisms} easily to an existing table or character
|
||||
|
||||
If the \code{dplyr} package is installed, their join functions will be used. Otherwise, the much slower \code{\link[=merge]{merge()}} function from base R will be used.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -48,7 +48,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\name{key_antibiotics}
|
||||
\alias{key_antibiotics}
|
||||
\alias{key_antibiotics_equal}
|
||||
\title{Key antibiotics for first \emph{weighted} isolates}
|
||||
\title{Key Antibiotics for First (Weighted) Isolates}
|
||||
\usage{
|
||||
key_antibiotics(
|
||||
x,
|
||||
@ -56,19 +56,19 @@ key_antibiotics_equal(
|
||||
|
||||
\item{y, z}{character vectors to compare}
|
||||
|
||||
\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see Details}
|
||||
\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see \emph{Details}}
|
||||
|
||||
\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see Details}
|
||||
\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see \emph{Details}}
|
||||
|
||||
\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see Details}
|
||||
\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see \emph{Details}}
|
||||
|
||||
\item{info}{print progress}
|
||||
}
|
||||
\description{
|
||||
These function can be used to determine first isolates (see \code{\link[=first_isolate]{first_isolate()}}). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first \emph{weighted} isolates.
|
||||
These function can be used to determine first isolates (see \code{\link[=first_isolate]{first_isolate()}}). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first 'weighted' isolates.
|
||||
}
|
||||
\details{
|
||||
The \code{\link[=key_antibiotics]{key_antibiotics()}} function is context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}.
|
||||
The \code{\link[=key_antibiotics]{key_antibiotics()}} function is context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}.
|
||||
|
||||
The function \code{\link[=key_antibiotics]{key_antibiotics()}} returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}}, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (\code{"."}) by \code{\link[=key_antibiotics]{key_antibiotics()}} and ignored by \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}}.
|
||||
|
||||
@ -108,7 +108,7 @@ At default the antibiotics that are used for \strong{Gram-negative bacteria} are
|
||||
|
||||
The function \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}} checks the characters returned by \code{\link[=key_antibiotics]{key_antibiotics()}} for equality, and returns a \code{\link{logical}} vector.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -116,9 +116,9 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Key antibiotics}{
|
||||
\section{Key Antibiotics}{
|
||||
|
||||
There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results:
|
||||
There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
|
||||
\enumerate{
|
||||
\item Using \code{type = "keyantibiotics"} and argument \code{ignore_I}
|
||||
|
||||
@ -129,7 +129,7 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S
|
||||
}
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
\alias{kurtosis.default}
|
||||
\alias{kurtosis.matrix}
|
||||
\alias{kurtosis.data.frame}
|
||||
\title{Kurtosis of the sample}
|
||||
\title{Kurtosis of the Sample}
|
||||
\usage{
|
||||
kurtosis(x, na.rm = FALSE, excess = FALSE)
|
||||
|
||||
@ -25,7 +25,7 @@ kurtosis(x, na.rm = FALSE, excess = FALSE)
|
||||
\description{
|
||||
Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -33,7 +33,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,26 +2,26 @@
|
||||
% Please edit documentation in R/lifecycle.R
|
||||
\name{lifecycle}
|
||||
\alias{lifecycle}
|
||||
\title{Lifecycles of functions in the \code{AMR} package}
|
||||
\title{Lifecycles of Functions in the \code{amr} Package}
|
||||
\description{
|
||||
Functions in this \code{AMR} package are categorised using \href{https://www.Tidyverse.org/lifecycle}{the lifecycle circle of the Tidyverse as found on www.tidyverse.org/lifecycle}.
|
||||
|
||||
\if{html}{\figure{lifecycle_tidyverse.svg}{options: height=200px style=margin-bottom:5px} \cr}
|
||||
This page contains a section for every lifecycle (with text borrowed from the aforementioned Tidyverse website), so they can be used in the manual pages of the functions.
|
||||
}
|
||||
\section{Experimental lifecycle}{
|
||||
\section{Experimental Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{experimental}. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this \code{AMR} package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.
|
||||
}
|
||||
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -29,13 +29,13 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Retired lifecycle}{
|
||||
\section{Retired Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
|
||||
}
|
||||
|
||||
\section{Questioning lifecycle}{
|
||||
\section{Questioning Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all.
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{like}
|
||||
\alias{\%like\%}
|
||||
\alias{\%like_case\%}
|
||||
\title{Pattern matching with keyboard shortcut}
|
||||
\title{Pattern Matching with Keyboard Shortcut}
|
||||
\source{
|
||||
Idea from the \href{https://github.com/Rdatatable/data.table/blob/master/R/like.R}{\code{like} function from the \code{data.table} package}
|
||||
}
|
||||
@ -39,7 +39,7 @@ The \verb{\%like\%} function:
|
||||
|
||||
Using RStudio? The text \verb{\%like\%} can also be directly inserted in your code from the Addins menu and can have its own Keyboard Shortcut like \code{Ctrl+Shift+L} or \code{Cmd+Shift+L} (see \code{Tools} > \verb{Modify Keyboard Shortcuts...}).
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -47,7 +47,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
43
man/mdro.Rd
43
man/mdro.Rd
@ -14,9 +14,9 @@
|
||||
\alias{mdr_tb}
|
||||
\alias{mdr_cmi2012}
|
||||
\alias{eucast_exceptional_phenotypes}
|
||||
\title{Determine multidrug-resistant organisms (MDRO)}
|
||||
\title{Determine Multidrug-Resistant Organisms (MDRO)}
|
||||
\source{
|
||||
Please see \emph{Details} for the list of publications used for this function.
|
||||
See the supported guidelines above for the list of publications used for this function.
|
||||
}
|
||||
\usage{
|
||||
mdro(
|
||||
@ -30,7 +30,7 @@ mdro(
|
||||
...
|
||||
)
|
||||
|
||||
custom_mdro_guideline(...)
|
||||
custom_mdro_guideline(..., as_factor = TRUE)
|
||||
|
||||
brmo(x, guideline = "BRMO", ...)
|
||||
|
||||
@ -45,7 +45,7 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
|
||||
\arguments{
|
||||
\item{x}{a \link{data.frame} with antibiotics columns, like \code{AMX} or \code{amox}. Can be left blank for automatic determination.}
|
||||
|
||||
\item{guideline}{a specific guideline to follow. Can also have \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} as input. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, please see \emph{Details}.}
|
||||
\item{guideline}{a specific guideline to follow, see sections \emph{Supported international / national guidelines} and \emph{Using Custom Guidelines} below. When left empty, the publication by Magiorakos \emph{et al.} (see below) will be followed.}
|
||||
|
||||
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
|
||||
@ -57,7 +57,9 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
|
||||
|
||||
\item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
|
||||
|
||||
\item{...}{column name of an antibiotic, please see section \emph{Antibiotics} below}
|
||||
\item{...}{in case of \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}}: a set of rules, see section \emph{Using Custom Guidelines} below. Otherwise: column name of an antibiotic, see section \emph{Antibiotics} below.}
|
||||
|
||||
\item{as_factor}{a \link{logical} to indicate whether the returned value should be an ordered \link{factor} (\code{TRUE}, default), or otherwise a \link{character} vector}
|
||||
}
|
||||
\value{
|
||||
\itemize{
|
||||
@ -75,12 +77,14 @@ Ordered \link{factor} with levels \code{Negative} < \verb{Positive, unconfirmed}
|
||||
Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines.
|
||||
}
|
||||
\details{
|
||||
These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}.
|
||||
These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}.
|
||||
|
||||
For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}).
|
||||
|
||||
\strong{Note:} Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named \emph{order} Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu \emph{et al.} in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this \code{\link[=mdro]{mdro()}} function makes sure that results from before 2016 and after 2016 are identical.
|
||||
\subsection{International / National guidelines}{
|
||||
}
|
||||
\section{Supported International / National Guidelines}{
|
||||
|
||||
|
||||
Currently supported guidelines are (case-insensitive):
|
||||
\itemize{
|
||||
@ -107,33 +111,36 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI
|
||||
Please suggest your own (country-specific) guidelines by letting us know: \url{https://github.com/msberends/AMR/issues/new}.
|
||||
}
|
||||
|
||||
\subsection{Custom guidelines}{
|
||||
\section{Using Custom Guidelines}{
|
||||
|
||||
|
||||
Custom guidelines can be set with the \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.
|
||||
|
||||
If you are familiar with \code{case_when()} of the \code{dplyr} package, you will recognise the input method to set your own rules. Rules must be set using what \R considers to be the 'formula notation':\preformatted{custom <- custom_mdro_guideline("CIP == 'R' & age > 60" ~ "Elderly Type A",
|
||||
"ERY == 'R' & age > 60" ~ "Elderly Type B")
|
||||
If you are familiar with \code{case_when()} of the \code{dplyr} package, you will recognise the input method to set your own rules. Rules must be set using what \R considers to be the 'formula notation':\preformatted{custom <- custom_mdro_guideline(CIP == "R" & age > 60 ~ "Elderly Type A",
|
||||
ERY == "R" & age > 60 ~ "Elderly Type B")
|
||||
}
|
||||
|
||||
If a row/an isolate matches the first rule, the value after the first \code{~} (in this case \emph{'Elderly Type A'}) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The number of rules is unlimited.
|
||||
|
||||
You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.\preformatted{custom
|
||||
#> A set of custom MDRO rules:
|
||||
#> 1. CIP == "R" & age > 60 -> "Elderly Type A"
|
||||
#> 2. ERY == "R" & age > 60 -> "Elderly Type B"
|
||||
#> 3. Otherwise -> "Negative"
|
||||
#> 1. CIP is "R" and age is higher than 60 -> Elderly Type A
|
||||
#> 2. ERY is "R" and age is higher than 60 -> Elderly Type B
|
||||
#> 3. Otherwise -> Negative
|
||||
#>
|
||||
#> Unmatched rows will return NA.
|
||||
}
|
||||
|
||||
The outcome of the function can be used for the \code{guideline} argument in the \code{\link[=mdro]{mdro()}} function:\preformatted{x <- mdro(example_isolates, guideline = custom)
|
||||
table(x)
|
||||
#> Elderly Type A Elderly Type B Negative
|
||||
#> 43 891 1066
|
||||
}
|
||||
|
||||
The rules set (the \code{custom} object in this case) could be exported to a shared file location using \code{\link[=saveRDS]{saveRDS()}} if you collaborate with multiple users. The custom rules set could then be imported using \code{\link[=readRDS]{readRDS()}},
|
||||
}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -165,7 +172,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th
|
||||
This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
@ -174,8 +181,8 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/
|
||||
mdro(example_isolates, guideline = "EUCAST")
|
||||
|
||||
mdro(example_isolates,
|
||||
guideline = custom_mdro_guideline("AMX == 'R'" ~ "Custom MDRO 1",
|
||||
"VAN == 'R'" ~ "Custom MDRO 2"))
|
||||
guideline = custom_mdro_guideline(AMX == "R" ~ "Custom MDRO 1",
|
||||
VAN == "R" ~ "Custom MDRO 2"))
|
||||
|
||||
\donttest{
|
||||
if (require("dplyr")) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{microorganisms}
|
||||
\alias{microorganisms}
|
||||
\title{Data set with 67,151 microorganisms}
|
||||
\title{Data Set with 67,151 Microorganisms}
|
||||
\format{
|
||||
A \link{data.frame} with 67,151 observations and 16 variables:
|
||||
\itemize{
|
||||
@ -13,7 +13,7 @@ A \link{data.frame} with 67,151 observations and 16 variables:
|
||||
\item \code{rank}\cr Text of the taxonomic rank of the microorganism, like \code{"species"} or \code{"genus"}
|
||||
\item \code{ref}\cr Author(s) and year of concerning scientific publication
|
||||
\item \code{species_id}\cr ID of the species as used by the Catalogue of Life
|
||||
\item \code{source}\cr Either "CoL", "DSMZ" (see Source) or "manually added"
|
||||
\item \code{source}\cr Either "CoL", "DSMZ" (see \emph{Source}) or "manually added"
|
||||
\item \code{prevalence}\cr Prevalence of the microorganism, see \code{\link[=as.mo]{as.mo()}}
|
||||
\item \code{snomed}\cr SNOMED code of the microorganism. Use \code{\link[=mo_snomed]{mo_snomed()}} to retrieve it quickly, see \code{\link[=mo_property]{mo_property()}}.
|
||||
}
|
||||
@ -63,7 +63,7 @@ The file in \R format (with preserved data structure) can be found here:
|
||||
}
|
||||
}
|
||||
}
|
||||
\section{About the records from DSMZ (see source)}{
|
||||
\section{About the Records from DSMZ (see \emph{Source})}{
|
||||
|
||||
Names of prokaryotes are defined as being validly published by the International Code of Nomenclature of Bacteria. Validly published are all names which are included in the Approved Lists of Bacterial Names and the names subsequently published in the International Journal of Systematic Bacteriology (IJSB) and, from January 2000, in the International Journal of Systematic and Evolutionary Microbiology (IJSEM) as original articles or in the validation lists.
|
||||
\emph{(from \url{https://www.dsmz.de/services/online-tools/prokaryotic-nomenclature-up-to-date})}
|
||||
@ -79,12 +79,12 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{microorganisms.codes}
|
||||
\alias{microorganisms.codes}
|
||||
\title{Data set with 5,580 common microorganism codes}
|
||||
\title{Data Set with 5,580 Common Microorganism Codes}
|
||||
\format{
|
||||
A \link{data.frame} with 5,580 observations and 2 variables:
|
||||
\itemize{
|
||||
@ -17,7 +17,7 @@ microorganisms.codes
|
||||
\description{
|
||||
A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with \code{\link[=set_mo_source]{set_mo_source()}}. They will all be searched when using \code{\link[=as.mo]{as.mo()}} and consequently all the \code{\link[=mo_property]{mo_*}} functions.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
@ -30,7 +30,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{microorganisms.old}
|
||||
\alias{microorganisms.old}
|
||||
\title{Data set with previously accepted taxonomic names}
|
||||
\title{Data Set with Previously Accepted Taxonomic Names}
|
||||
\format{
|
||||
A \link{data.frame} with 12,708 observations and 4 variables:
|
||||
\itemize{
|
||||
@ -32,12 +32,12 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/mo_matching_score.R
|
||||
\name{mo_matching_score}
|
||||
\alias{mo_matching_score}
|
||||
\title{Calculate the matching score for microorganisms}
|
||||
\title{Calculate the Matching Score for Microorganisms}
|
||||
\usage{
|
||||
mo_matching_score(x, n)
|
||||
}
|
||||
@ -14,7 +14,7 @@ mo_matching_score(x, n)
|
||||
\description{
|
||||
This algorithm is used by \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions to determine the most probable match of taxonomic records based on user input.
|
||||
}
|
||||
\section{Matching score for microorganisms}{
|
||||
\section{Matching Score for Microorganisms}{
|
||||
|
||||
With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as:
|
||||
|
||||
@ -35,7 +35,7 @@ The grouping into human pathogenic prevalence (\eqn{p}) is based on experience f
|
||||
All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., \code{"E. coli"} will return the microbial ID of \emph{Escherichia coli} (\eqn{m = 0.688}, a highly prevalent microorganism found in humans) and not \emph{Entamoeba coli} (\eqn{m = 0.079}, a less prevalent microorganism in humans), although the latter would alphabetically come first.
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -43,12 +43,12 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
\alias{mo_synonyms}
|
||||
\alias{mo_info}
|
||||
\alias{mo_url}
|
||||
\title{Get properties of a microorganism}
|
||||
\title{Get Properties of a Microorganism}
|
||||
\usage{
|
||||
mo_name(x, language = get_locale(), ...)
|
||||
|
||||
@ -88,7 +88,7 @@ mo_url(x, open = FALSE, language = get_locale(), ...)
|
||||
mo_property(x, property = "fullname", language = get_locale(), ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, please see \emph{Examples}.}
|
||||
\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, see \emph{Examples}.}
|
||||
|
||||
\item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can be overwritten by setting the option \code{AMR_locale}, e.g. \code{options(AMR_locale = "de")}, see \link{translate}. Also used to translate text like "no growth". Use \code{language = NULL} or \code{language = ""} to prevent translation.}
|
||||
|
||||
@ -110,7 +110,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
|
||||
}
|
||||
}
|
||||
\description{
|
||||
Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible to use microbial abbreviations, codes and names as input. Please see \emph{Examples}.
|
||||
Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible to use microbial abbreviations, codes and names as input. See \emph{Examples}.
|
||||
}
|
||||
\details{
|
||||
All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for \code{\link[=mo_ref]{mo_ref()}}, \code{\link[=mo_authors]{mo_authors()}} and \code{\link[=mo_year]{mo_year()}}. Please refer to this example, knowing that \emph{Escherichia blattae} was renamed to \emph{Shimwellia blattae} in 2010:
|
||||
@ -134,7 +134,7 @@ All output will be \link{translate}d where possible.
|
||||
|
||||
The function \code{\link[=mo_url]{mo_url()}} will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -142,7 +142,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Matching score for microorganisms}{
|
||||
\section{Matching Score for Microorganisms}{
|
||||
|
||||
With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as:
|
||||
|
||||
@ -182,12 +182,12 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
}
|
||||
}
|
||||
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\alias{mo_source}
|
||||
\alias{set_mo_source}
|
||||
\alias{get_mo_source}
|
||||
\title{User-defined reference data set for microorganisms}
|
||||
\title{User-Defined Reference Data Set for Microorganisms}
|
||||
\usage{
|
||||
set_mo_source(
|
||||
path,
|
||||
@ -14,7 +14,7 @@ set_mo_source(
|
||||
get_mo_source(destination = getOption("AMR_mo_source", "~/mo_source.rds"))
|
||||
}
|
||||
\arguments{
|
||||
\item{path}{location of your reference file, see Details. Can be \code{""}, \code{NULL} or \code{FALSE} to delete the reference file.}
|
||||
\item{path}{location of your reference file, see \emph{Details}. Can be \code{""}, \code{NULL} or \code{FALSE} to delete the reference file.}
|
||||
|
||||
\item{destination}{destination of the compressed data file, default to the user's home directory.}
|
||||
}
|
||||
@ -34,7 +34,7 @@ The function \code{\link[=get_mo_source]{get_mo_source()}} will return the data
|
||||
|
||||
Reading an Excel file (\code{.xlsx}) with only one row has a size of 8-9 kB. The compressed file created with \code{\link[=set_mo_source]{set_mo_source()}} will then have a size of 0.1 kB and can be read by \code{\link[=get_mo_source]{get_mo_source()}} in only a couple of microseconds (millionths of a second).
|
||||
}
|
||||
\section{How to setup}{
|
||||
\section{How to Setup}{
|
||||
|
||||
|
||||
Imagine this data on a sheet of an Excel file (mo codes were looked up in the \link{microorganisms} data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:\preformatted{ | A | B |
|
||||
@ -95,7 +95,7 @@ To delete the reference data file, just use \code{""}, \code{NULL} or \code{FALS
|
||||
If the original file (in the previous case an Excel file) is moved or deleted, the \code{mo_source.rds} file will be removed upon the next use of \code{\link[=as.mo]{as.mo()}} or any \code{\link[=mo_property]{mo_*}} function.
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -103,7 +103,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -59,12 +59,17 @@ The \code{\link[=pca]{pca()}} function takes a \link{data.frame} as input and pe
|
||||
|
||||
The result of the \code{\link[=pca]{pca()}} function is a \link{prcomp} object, with an additional attribute \code{non_numeric_cols} which is a vector with the column names of all columns that do not contain numeric values. These are probably the groups and labels, and will be used by \code{\link[=ggplot_pca]{ggplot_pca()}}.
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
||||
\examples{
|
||||
# `example_isolates` is a dataset available in the AMR package.
|
||||
# See ?example_isolates.
|
||||
|
@ -7,7 +7,7 @@
|
||||
\alias{barplot.mic}
|
||||
\alias{plot.rsi}
|
||||
\alias{barplot.rsi}
|
||||
\title{Plotting for classes \code{rsi}, \code{mic} and \code{disk}}
|
||||
\title{Plotting for Classes \code{rsi}, \code{mic} and \code{disk}}
|
||||
\usage{
|
||||
\method{plot}{disk}(
|
||||
x,
|
||||
@ -98,7 +98,7 @@
|
||||
\description{
|
||||
Functions to print classes of the \code{AMR} package.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -106,7 +106,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
\alias{proportion_S}
|
||||
\alias{proportion_df}
|
||||
\alias{rsi_df}
|
||||
\title{Calculate microbial resistance}
|
||||
\title{Calculate Microbial Resistance}
|
||||
\source{
|
||||
\strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
|
||||
}
|
||||
@ -52,13 +52,13 @@ rsi_df(
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.}
|
||||
\item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See \emph{Examples}.}
|
||||
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.}
|
||||
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.}
|
||||
|
||||
\item{as_percent}{a logical to indicate whether the output must be returned as a hundred fold with \% sign (a character). A value of \code{0.123456} will then be returned as \code{"12.3\%"}.}
|
||||
|
||||
\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination therapy} below}
|
||||
\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination Therapy} below}
|
||||
|
||||
\item{data}{a \link{data.frame} containing columns with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}})}
|
||||
|
||||
@ -74,7 +74,7 @@ rsi_df(
|
||||
A \link{double} or, when \code{as_percent = TRUE}, a \link{character}.
|
||||
}
|
||||
\description{
|
||||
These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, please see \emph{Examples}.
|
||||
These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, see \emph{Examples}.
|
||||
|
||||
\code{\link[=resistance]{resistance()}} should be used to calculate resistance, \code{\link[=susceptibility]{susceptibility()}} should be used to calculate susceptibility.\cr
|
||||
}
|
||||
@ -87,7 +87,7 @@ These functions are not meant to count isolates, but to calculate the proportion
|
||||
|
||||
The function \code{\link[=proportion_df]{proportion_df()}} takes any variable from \code{data} that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) and calculates the proportions R, I and S. It also supports grouped variables. The function \code{\link[=rsi_df]{rsi_df()}} works exactly like \code{\link[=proportion_df]{proportion_df()}}, but adds the number of isolates.
|
||||
}
|
||||
\section{Combination therapy}{
|
||||
\section{Combination Therapy}{
|
||||
|
||||
When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI:\preformatted{--------------------------------------------------------------------
|
||||
only_all_tested = FALSE only_all_tested = TRUE
|
||||
@ -118,7 +118,7 @@ and that, in combination therapies, for \code{only_all_tested = FALSE} applies t
|
||||
Using \code{only_all_tested} has no impact when only using one antibiotic as input.
|
||||
}
|
||||
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -141,7 +141,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th
|
||||
This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
\alias{random_mic}
|
||||
\alias{random_disk}
|
||||
\alias{random_rsi}
|
||||
\title{Random MIC values/disk zones/RSI generation}
|
||||
\title{Random MIC Values/Disk Zones/RSI Generation}
|
||||
\usage{
|
||||
random_mic(size, mo = NULL, ab = NULL, ...)
|
||||
|
||||
@ -35,13 +35,13 @@ The base R function \code{\link[=sample]{sample()}} is used for generating value
|
||||
|
||||
Generated values are based on the latest EUCAST guideline implemented in the \link{rsi_translation} data set. To create specific generated values per bug or drug, set the \code{mo} and/or \code{ab} argument.
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ ggplot_rsi_predict(
|
||||
|
||||
\item{minimum}{minimal amount of available isolates per year to include. Years containing less observations will be estimated by the model.}
|
||||
|
||||
\item{model}{the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.}
|
||||
\item{model}{the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See \emph{Details} for all valid options.}
|
||||
|
||||
\item{I_as_S}{a logical to indicate whether values \code{"I"} should be treated as \code{"S"} (will otherwise be treated as \code{"R"}). The default, \code{TRUE}, follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section \emph{Interpretation of S, I and R} below.}
|
||||
|
||||
@ -87,7 +87,7 @@ A \link{data.frame} with extra class \code{\link{resistance_predict}} with colum
|
||||
\item \code{estimated}, the estimated resistant percentages, calculated by the model
|
||||
}
|
||||
|
||||
Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, please see \emph{Examples}.
|
||||
Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, see \emph{Examples}.
|
||||
}
|
||||
\description{
|
||||
Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example.
|
||||
@ -100,7 +100,7 @@ Valid options for the statistical model (argument \code{model}) are:
|
||||
\item \code{"lin"} or \code{"linear"}: a linear regression model
|
||||
}
|
||||
}
|
||||
\section{Maturing lifecycle}{
|
||||
\section{Maturing Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=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. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}.
|
||||
@ -121,7 +121,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th
|
||||
This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\docType{data}
|
||||
\name{rsi_translation}
|
||||
\alias{rsi_translation}
|
||||
\title{Data set for R/SI interpretation}
|
||||
\title{Data Set for R/SI Interpretation}
|
||||
\format{
|
||||
A \link{data.frame} with 20,486 observations and 10 variables:
|
||||
\itemize{
|
||||
@ -28,12 +28,12 @@ Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines
|
||||
\details{
|
||||
The repository of this \code{AMR} package contains a file comprising this exact data set: \url{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}. This file \strong{allows for machine reading EUCAST and CLSI guidelines}, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically.
|
||||
}
|
||||
\section{Reference data publicly available}{
|
||||
\section{Reference Data Publicly Available}{
|
||||
|
||||
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{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 \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
\alias{skewness.default}
|
||||
\alias{skewness.matrix}
|
||||
\alias{skewness.data.frame}
|
||||
\title{Skewness of the sample}
|
||||
\title{Skewness of the Sample}
|
||||
\usage{
|
||||
skewness(x, na.rm = FALSE)
|
||||
|
||||
@ -25,7 +25,7 @@ Skewness is a measure of the asymmetry of the probability distribution of a real
|
||||
|
||||
When negative ('left-skewed'): the left tail is longer; the mass of the distribution is concentrated on the right of a histogram. When positive ('right-skewed'): the right tail is longer; the mass of the distribution is concentrated on the left of a histogram. A normal distribution has a skewness of 0.
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -33,7 +33,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
\name{translate}
|
||||
\alias{translate}
|
||||
\alias{get_locale}
|
||||
\title{Translate strings from AMR package}
|
||||
\title{Translate Strings from AMR Package}
|
||||
\usage{
|
||||
get_locale()
|
||||
}
|
||||
@ -16,7 +16,7 @@ Strings will be translated to foreign languages if they are defined in a local t
|
||||
Currently supported languages are: Dutch, English, French, German, Italian, Portuguese, Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names.
|
||||
|
||||
Please suggest your own translations \href{https://github.com/msberends/AMR/issues/new?title=Translations}{by creating a new issue on our repository}.
|
||||
\subsection{Changing the default language}{
|
||||
\subsection{Changing the Default Language}{
|
||||
|
||||
The system language will be used at default (as returned by \code{Sys.getenv("LANG")} or, if \code{LANG} is not set, \code{\link[=Sys.getlocale]{Sys.getlocale()}}), if that language is supported. But the language to be used can be overwritten in two ways and will be checked in this order:
|
||||
\enumerate{
|
||||
@ -27,7 +27,7 @@ The system language will be used at default (as returned by \code{Sys.getenv("LA
|
||||
So if the R option \code{AMR_locale} is set, the system variables \code{LANGUAGE} and \code{LANG} will be ignored.
|
||||
}
|
||||
}
|
||||
\section{Stable lifecycle}{
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
|
||||
The \link[=lifecycle]{lifecycle} of this function is \strong{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.
|
||||
@ -35,7 +35,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl
|
||||
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.
|
||||
}
|
||||
|
||||
\section{Read more on our website!}{
|
||||
\section{Read more on Our Website!}{
|
||||
|
||||
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
|
||||
}
|
||||
|
Reference in New Issue
Block a user