* Support for EUCAST Clinical Breakpoints v11.0 (2021), effective in the `eucast_rules()` function and in `as.rsi()` to interpret MIC and disk diffusion values. This is now the default guideline in this package.
@ -32,10 +32,12 @@
@@ -32,10 +32,12 @@
* Updated the data set `microorganisms.codes` (which contains popular LIS and WHONET codes for microorganisms) for some species of *Mycobacterium* that previously incorrectly returned *M. africanum*
* Added Pretomanid (PMD, J04AK08) to the `antibiotics` data set
* WHONET code `"PNV"` will now correctly be interpreted as `PHN`, the antibiotic code for phenoxymethylpenicillin ('peni V')
* Fix for verbose output of `mdro(..., verbose = TRUE)` for German guideline (3MGRN and 4MGRN) and *P. aeruginosa* in Dutch guideline (BRMO)
* Fix for verbose output of `mdro(..., verbose = TRUE)` for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only *P. aeruginosa*)
* `is.rsi.eligible()` now returns `FALSE` immediately if the input does not contain any of the values "R", "S" or "I". This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
### Other
* Big documentation updates
* Loading the package (i.e., `library(AMR)`) now is ~50 times faster than before
#' 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.
#' @param cols_ab a character vector of column names of `x`, or (a combination with) an [antibiotic selector function]([ab_class()]), such as [carbapenems()] and [aminoglycosides()]
#' 2. For **interpreting minimum inhibitory concentration (MIC) values** according to EUCAST or CLSI. You must clean your MIC values first using [as.mic()], that also gives your columns the new data class [`mic`]. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the `mo` argument.
#' * Using `dplyr`, R/SI interpretation can be done very easily with either:
#' ```
#' your_data %>% mutate_if(is.mic, as.rsi) # until dplyr 1.0.0
#' your_data %>% mutate(across(where(is.mic), as.rsi)) # since dplyr 1.0.0
#' your_data %>% mutate_if(is.mic, as.rsi) # until dplyr 1.0.0
#' your_data %>% mutate(across((is.mic), as.rsi)) # since dplyr 1.0.0
#' ```
#' * Operators like "<=" will be stripped before interpretation. When using `conserve_capped_values = TRUE`, an MIC value of e.g. ">2" will always return "R", even if the breakpoint according to the chosen guideline is ">=4". This is to prevent that capped values from raw laboratory data would not be treated conservatively. The default behaviour (`conserve_capped_values = FALSE`) considers ">2" to be lower than ">=4" and might in this case return "S" or "I".
#'
#' 3. For **interpreting disk diffusion diameters** according to EUCAST or CLSI. You must clean your disk zones first using [as.disk()], that also gives your columns the new data class [`disk`]. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the `mo` argument.
#' * Using `dplyr`, R/SI interpretation can be done very easily with either:
#' ```
#' your_data %>% mutate_if(is.disk, as.rsi) # until dplyr 1.0.0
#' your_data %>% mutate(across(where(is.disk), as.rsi)) # since dplyr 1.0.0
#' your_data %>% mutate_if(is.disk, as.rsi) # until dplyr 1.0.0
#' your_data %>% mutate(across((is.disk), as.rsi)) # since dplyr 1.0.0
#' ```
#'
#' 4. For **interpreting a complete data set**, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running `as.rsi(data)`.
* Since version 0.3.0 (2018-08-14), CHECK returns a NOTE for having a data directory over 3 MB. This is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package.
* Ever since one of the first CRAN releases, CHECK returns a NOTE for having a data and R directory over 3 MB. This is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package.
<p>Many R users just ask questions on websites like <ahref="https://stackoverflow.com">StackOverflow.com</a>, the largest online community for programmers. At the time of writing, more than <ahref="https://stackoverflow.com/questions/tagged/r?sort=votes">360,000 R-related questions</a> have already been asked on this platform (which covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.</p>
<p>Many R users just ask questions on websites like <ahref="https://stackoverflow.com">StackOverflow.com</a>, the largest online community for programmers. At the time of writing, <ahref="https://stackoverflow.com/questions/tagged/r?sort=votes">383,346 R-related questions</a> have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.</p>
</li>
<li>
<p><strong>R understands any data type, including SPSS/SAS/Stata.</strong></p>
@ -243,7 +243,7 @@
@@ -243,7 +243,7 @@
<li>
<p><strong>R is (nowadays) the preferred analysis software in academic papers.</strong></p>
<p>At present, R is among the world most powerful statistical languages, and it is generally very popular in science (Bollmann <em>et al.</em>, 2017). For all the above reasons, the number of references to R as an analysis method in academic papers <ahref="https://r4stats.com/2014/08/20/r-passes-spss-in-scholarly-use-stata-growing-rapidly/">is rising continuously</a> and has even surpassed SPSS for academic use (Muenchen, 2014).</p>
<p>I believe that the thing with SPSS is, that it has always had a great user interface which is very easy to learn and use. Back when they developed it, they had very little competition, let alone from R. R didnโt even had a professional user interface until the last decade (called RStudio, see below). How people used R between the nineties and 2010 is almost completely incomparable to how R is being used now. The language itself <ahref="https://www.tidyverse.org/packages/">has been restyled completely</a> by volunteers who are dedicated professionals in the field of data science. SPSS was great when there was nothing else that could compete. But now in 2020, I donโt see any reason why SPSS would be of any better use than R.</p>
<p>I believe that the thing with SPSS is, that it has always had a great user interface which is very easy to learn and use. Back when they developed it, they had very little competition, let alone from R. R didnโt even had a professional user interface until the last decade (called RStudio, see below). How people used R between the nineties and 2010 is almost completely incomparable to how R is being used now. The language itself <ahref="https://www.tidyverse.org/packages/">has been restyled completely</a> by volunteers who are dedicated professionals in the field of data science. SPSS was great when there was nothing else that could compete. But now in 2021, I donโt see any reason why SPSS would be of any better use than R.</p>
<ahref="#last-updated-18-january-2021"class="anchor"></a><small>Last updated: 18 January 2021</small>
<ahref="#last-updated-22-january-2021"class="anchor"></a><small>Last updated: 22 January 2021</small>
</h2>
<divid="new"class="section level3">
<h3class="hasAnchor">
@ -285,7 +285,9 @@
@@ -285,7 +285,9 @@
</li>
<li>Added Pretomanid (PMD, J04AK08) to the <code>antibiotics</code> data set</li>
<li>WHONET code <code>"PNV"</code> will now correctly be interpreted as <code>PHN</code>, the antibiotic code for phenoxymethylpenicillin (โpeni Vโ)</li>
<li>Fix for verbose output of <code><ahref="../reference/mdro.html">mdro(..., verbose = TRUE)</a></code> for German guideline (3MGRN and 4MGRN) and <em>P. aeruginosa</em> in Dutch guideline (BRMO)</li>
<li>Fix for verbose output of <code><ahref="../reference/mdro.html">mdro(..., verbose = TRUE)</a></code> for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only <em>P. aeruginosa</em>)</li>
<li>
<code><ahref="../reference/as.rsi.html">is.rsi.eligible()</a></code> now returns <code>FALSE</code> immediately if the input does not contain any of the values โRโ, โSโ or โIโ. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li>
</ul>
</div>
<divid="other"class="section level3">
@ -293,6 +295,7 @@
@@ -293,6 +295,7 @@
<ahref="#other"class="anchor"></a>Other</h3>
<ul>
<li>Big documentation updates</li>
<li>Loading the package (i.e., <code><ahref="https://msberends.github.io/AMR/">library(AMR)</a></code>) now is ~50 times faster than before</li>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.5.0.9006</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.5.0.9008</span>
</span>
</div>
@ -346,14 +346,14 @@
@@ -346,14 +346,14 @@
<p>The <code>as.rsi()</code> function works in four ways:</p><ol>
<li><p>For <strong>cleaning raw / untransformed data</strong>. The data will be cleaned to only contain values S, I and R and will try its best to determine this with some intelligence. For example, mixed values with R/SI interpretations and MIC values such as <code>"<0.25; S"</code> will be coerced to <code>"S"</code>. Combined interpretations for multiple test methods (as seen in laboratory records) such as <code>"S; S"</code> will be coerced to <code>"S"</code>, but a value like <code>"S; I"</code> will return <code>NA</code> with a warning that the input is unclear.</p></li>
<li><p>For <strong>interpreting minimum inhibitory concentration (MIC) values</strong> according to EUCAST or CLSI. You must clean your MIC values first using <code><ahref='as.mic.html'>as.mic()</a></code>, that also gives your columns the new data class <code><ahref='as.mic.html'>mic</a></code>. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the <code>mo</code> argument.</p><ul>
<li><p>Using <code>dplyr</code>, R/SI interpretation can be done very easily with either:</p><pre><spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate_all.html'>mutate_if</a></span><spanclass='op'>(</span><spanclass='va'>is.mic</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='co'># until dplyr 1.0.0</span>
<spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><spanclass='op'>(</span><spanclass='fu'>where</span><spanclass='op'>(</span><spanclass='va'>is.mic</span><spanclass='op'>)</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='co'># since dplyr 1.0.0</span>
<li><p>Using <code>dplyr</code>, R/SI interpretation can be done very easily with either:</p><pre><spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate_all.html'>mutate_if</a></span><spanclass='op'>(</span><spanclass='va'>is.mic</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='co'># until dplyr 1.0.0</span>
<spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><spanclass='op'>(</span><spanclass='op'>(</span><spanclass='va'>is.mic</span><spanclass='op'>)</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='co'># since dplyr 1.0.0</span>
</pre></li>
<li><p>Operators like "<=" will be stripped before interpretation. When using <code>conserve_capped_values = TRUE</code>, an MIC value of e.g. ">2" will always return "R", even if the breakpoint according to the chosen guideline is ">=4". This is to prevent that capped values from raw laboratory data would not be treated conservatively. The default behaviour (<code>conserve_capped_values = FALSE</code>) considers ">2" to be lower than ">=4" and might in this case return "S" or "I".</p></li>
</ul></li>
<li><p>For <strong>interpreting disk diffusion diameters</strong> according to EUCAST or CLSI. You must clean your disk zones first using <code><ahref='as.disk.html'>as.disk()</a></code>, that also gives your columns the new data class <code><ahref='as.disk.html'>disk</a></code>. Also, be sure to have a column with microorganism names or codes. It will be found automatically, but can be set manually using the <code>mo</code> argument.</p><ul>
<li><p>Using <code>dplyr</code>, R/SI interpretation can be done very easily with either:</p><pre><spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate_all.html'>mutate_if</a></span><spanclass='op'>(</span><spanclass='va'>is.disk</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='co'># until dplyr 1.0.0</span>
<spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><spanclass='op'>(</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><spanclass='op'>(</span><spanclass='fu'>where</span><spanclass='op'>(</span><spanclass='va'>is.disk</span><spanclass='op'>)</span>, <spanclass='va'>as.rsi</span><spanclass='op'>)</span><spanclass='op'>)</span><spanclass='co'># since dplyr 1.0.0</span>
<li><p>Using <code>dplyr</code>, R/SI interpretation can be done very easily with either:</p><pre><spanclass='va'>your_data</span><spanclass='op'>%>%</span><spanclass='fu'><ahref='https://dplyr.tidyverse.org/reference/mutate_all.html'>mutate_if</a></span><spanclass='op'>(</span><spanclass='va'>is.disk</span>, <spanclass='va'>as.rsi</span>