* Custom MDRO guidelines can now be combined with other custom MDRO guidelines using `c()`
* Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule
@ -12,6 +12,7 @@
@@ -12,6 +12,7 @@
* The `example_isolates` data set now contains some (fictitious) zero-year old patients
* Fix for minor translation errors
* Printing of microbial codes in a `data.frame` or `tibble` now gives a warning if the data contains old microbial codes (from a previous AMR package version)
* `first_isolate()` can now take a vector of values for `col_keyantibiotics` and can have an episode length of `Inf`
#' These functions determine which items in a vector can be considered (the start of) a new episode, based on the argument `episode_days`. This can be used to determine clinical episodes for any epidemiological analysis. The [get_episode()] function returns the index number of the episode per group, while the [is_new_episode()] function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode.
#' @inheritSection lifecycle Stable Lifecycle
#' @param x vector of dates (class `Date` or `POSIXt`)
#' @param episode_days required episode length in days, can also be less than a day, see *Details*
#' @param episode_days required episode length in days, can also be less than a day or `Inf`, see *Details*
#' @param ... currently not used
#' @details
#' Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least `episode_days` days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least `episode_days` days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored.
@ -88,7 +88,7 @@
@@ -88,7 +88,7 @@
#' # grouping on patients and microorganisms leads to the same results
#' @param col_testcode column name of the test codes. Use `col_testcode = NULL` to **not** exclude certain test codes (such as test codes for screening). In that case `testcodes_exclude` will be ignored.
#' @param col_specimen column name of the specimen type or group
#' @param col_icu column name of the logicals (`TRUE`/`FALSE`) whether a ward or department is an Intensive Care Unit (ICU)
#' @param col_keyantibiotics column name of the key antibiotics to determine first (weighted) isolates, see [key_antibiotics()]. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use `col_keyantibiotics = FALSE` to prevent this.
#' @param col_keyantibiotics column name of the key antibiotics to determine first (weighted) isolates, see [key_antibiotics()]. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use `col_keyantibiotics = FALSE` to prevent this. Can also be the output of [key_antibiotics()].
#' @param 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*.
#' @param testcodes_exclude character vector with test codes that should be excluded (case-insensitive)
#' @param icu_exclude logical to indicate whether ICU isolates should be excluded (rows with value `TRUE` in the column set with `col_icu`)
<p><em>Note: the rules of ‘EUCAST Clinical Breakpoints v11.0 (2021)’ are now implemented.</em></p>
<blockquote>
<p><spanclass="fa fa-clipboard-list"style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span><strong>PLEASE TAKE PART IN OUR SURVEY!</strong><br>
Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. <strong>If you have a minute, please <ahref="./survey.html">anonymously fill in this short questionnaire</a></strong>. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance! <br><aclass="btn btn-info btn-amr"href="./survey.html">Take me to the 5-min survey!</a></p>
</blockquote>
<divid="what-is-amr-for-r"class="section level3">
<h3class="hasAnchor">
<ahref="#what-is-amr-for-r"class="anchor"></a>What is <code>AMR</code> (for R)?</h3>
<p><em>(To find out how to conduct AMR data analysis, please <ahref="./articles/AMR.html">continue reading here to get started</a>.)</em></p>
<p><code>AMR</code> is a free, open-source and independent <ahref="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.</p>
<p><code>AMR</code> is a free, open-source and independent <ahref="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.</p>
<p>After installing this package, R knows <ahref="./reference/microorganisms.html"><strong>~70,000 distinct microbial species</strong></a> and all <ahref="./reference/antibiotics.html"><strong>~550 antibiotic, antimycotic and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.</p>
<p>This package is <ahref="https://en.wikipedia.org/wiki/Dependency_hell">fully independent of any other R package</a> and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <ahref="https://www.rug.nl">University of Groningen</a>, in collaboration with non-profit organisations <ahref="https://www.certe.nl">Certe Medical Diagnostics and Advice Foundation</a> and <ahref="https://www.umcg.nl">University Medical Center Groningen</a>. This R package is <ahref="./news">actively maintained</a> and is free software (see <ahref="#copyright">Copyright</a>).</p>
<li>Custom MDRO guidelines can now be combined with other custom MDRO guidelines using <code><ahref="https://rdrr.io/r/base/c.html">c()</a></code>
</li>
<li>Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule</li>
</ul>
</li>
<li>Fix for <code><ahref="../reference/age_groups.html">age_groups()</a></code> for persons aged zero</li>
<li>The <code>example_isolates</code> data set now contains some (fictitious) zero-year old patients</li>
<li>Fix for minor translation errors</li>
<li>Printing of microbial codes in a <code>data.frame</code> or <code>tibble</code> now gives a warning if the data contains old microbial codes (from a previous AMR package version)</li>
<li>
<code><ahref="../reference/first_isolate.html">first_isolate()</a></code> can now take a vector of values for <code>col_keyantibiotics</code> and can have an episode length of <code>Inf</code>
@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
@@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.5.0.9040</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.6.0.9001</span>
</span>
</div>
@ -314,7 +314,7 @@
@@ -314,7 +314,7 @@
</tr>
<tr>
<th>col_keyantibiotics</th>
<td><p>column name of the key antibiotics to determine first (weighted) isolates, see <code><ahref='key_antibiotics.html'>key_antibiotics()</a></code>. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use <code>col_keyantibiotics = FALSE</code> to prevent this.</p></td>
<td><p>column name of the key antibiotics to determine first (weighted) isolates, see <code><ahref='key_antibiotics.html'>key_antibiotics()</a></code>. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use <code>col_keyantibiotics = FALSE</code> to prevent this. Can also be the output of <code><ahref='key_antibiotics.html'>key_antibiotics()</a></code>.</p></td>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.5.0.9016</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.6.0.9001</span>
</span>
</div>
@ -255,7 +255,7 @@
@@ -255,7 +255,7 @@
</tr>
<tr>
<th>episode_days</th>
<td><p>required episode length in days, can also be less than a day, see <em>Details</em></p></td>
<td><p>required episode length in days, can also be less than a day or <code>Inf</code>, see <em>Details</em></p></td>
</tr>
<tr>
<th>...</th>
@ -337,7 +337,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -337,7 +337,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<spanclass='co'># grouping on patients and microorganisms leads to the same results</span>
title <spanclass='op'>=</span><spanclass='fu'><ahref='https://rdrr.io/r/base/paste.html'>paste</a></span><spanclass='op'>(</span><spanclass='st'>"MIC values of"</span>, <spanclass='fu'><ahref='https://rdrr.io/r/base/deparse.html'>deparse</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://rdrr.io/r/base/substitute.html'>substitute</a></span><spanclass='op'>(</span><spanclass='va'>data</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='op'>)</span>,
title <spanclass='op'>=</span><spanclass='fu'><ahref='https://rdrr.io/r/base/paste.html'>paste</a></span><spanclass='op'>(</span><spanclass='st'>"Disk zones of"</span>, <spanclass='fu'><ahref='https://rdrr.io/r/base/deparse.html'>deparse</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://rdrr.io/r/base/substitute.html'>substitute</a></span><spanclass='op'>(</span><spanclass='va'>data</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='op'>)</span>,
title <spanclass='op'>=</span><spanclass='fu'><ahref='https://rdrr.io/r/base/paste.html'>paste</a></span><spanclass='op'>(</span><spanclass='st'>"Resistance Overview of"</span>, <spanclass='fu'><ahref='https://rdrr.io/r/base/deparse.html'>deparse</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://rdrr.io/r/base/substitute.html'>substitute</a></span><spanclass='op'>(</span><spanclass='va'>data</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='op'>)</span>,
*Note: the rules of 'EUCAST Clinical Breakpoints v11.0 (2021)' are now implemented.*
> <spanclass="fa fa-clipboard-list"style="color: #128f76; font-size: 20pt; margin-right: 5px;"></span>**PLEASE TAKE PART IN OUR SURVEY!**
> Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. **If you have a minute, please [anonymously fill in this short questionnaire](./survey.html)**. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance!
> <br>
> <aclass="btn btn-info btn-amr"href="./survey.html">Take me to the 5-min survey!</a>
### What is `AMR` (for R)?
*(To find out how to conduct AMR data analysis, please [continue reading here to get started](./articles/AMR.html).)*
`AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
`AMR` is a free, open-source and independent [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
After installing this package, R knows [**~70,000 distinct microbial species**](./reference/microorganisms.html) and all [**~550 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, EARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
\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 (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. Can also be the output of \code{\link[=key_antibiotics]{key_antibiotics()}}.}
\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}.}