(v1.5.0.9029) added missing families and orders

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-03-05 01:31:46 +01:00
parent ddf88345f1
commit 0e0e3c4ffa
30 changed files with 61003 additions and 60523 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 1.5.0.9028
Date: 2021-03-04
Version: 1.5.0.9029
Date: 2021-03-05
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(
person(role = c("aut", "cre"),

View File

@ -1,5 +1,5 @@
# AMR 1.5.0.9028
## <small>Last updated: 4 March 2021</small>
# AMR 1.5.0.9029
## <small>Last updated: 5 March 2021</small>
### New
* 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.

10
R/ab.R
View File

@ -310,10 +310,12 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) {
x_translated <- paste(lapply(strsplit(x[i], "[^A-Z0-9]"),
function(y) {
for (i in seq_len(length(y))) {
y[i] <- ifelse(tolower(y[i]) %in% tolower(translations_file$replacement),
translations_file[which(tolower(translations_file$replacement) == tolower(y[i]) &
!isFALSE(translations_file$fixed)), "pattern"],
y[i])
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
y[i] <- ifelse(tolower(y[i]) %in% tolower(translations_file[, lang, drop = TRUE]),
translations_file[which(tolower(translations_file[, lang, drop = TRUE]) == tolower(y[i]) &
!isFALSE(translations_file$fixed)), "pattern"],
y[i])
}
}
generalise_antibiotic_name(y)
})[[1]],

View File

@ -55,6 +55,7 @@ globalVariables(c(".rowid",
"language",
"lookup",
"method",
"mic",
"mic ",
"microorganism",
"microorganisms",
@ -72,6 +73,7 @@ globalVariables(c(".rowid",
"reference.rule_group",
"reference.version",
"rowid",
"rsi",
"rsi_translation",
"rule_group",
"rule_name",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1 +1 @@
4eb2432919bb70629ef76e62e06da342
9b7ed0125f6b59c4bf111b5770e5d619

View File

@ -296,6 +296,79 @@ MOs <- MOs %>%
# clean up
df_remove_nonASCII()
# add all mssing genera, families and orders
MOs <- MOs %>%
bind_rows(
MOs %>%
arrange(genus, species) %>%
distinct(genus, .keep_all = TRUE) %>%
filter(rank == "species", source != "manually added") %>%
mutate(mo = gsub("^([A-Z]_[A-Z]+)_.*", "\\1", mo),
fullname = genus,
species = "",
subspecies = "",
rank = "genus",
species_id = "",
snomed = NA,
ref = NA_character_),
MOs %>%
group_by(family) %>%
filter(!any(rank == "family") & n() > 1) %>%
ungroup() %>%
arrange(family) %>%
distinct(family, .keep_all = TRUE) %>%
filter(!family %in% c("", NA), source != "manually added") %>%
mutate(mo = paste0(substr(kingdom, 1, 1), "_[FAM]_",
abbreviate(family,
minlength = 8,
use.classes = TRUE,
method = "both.sides",
strict = FALSE)),
mo = toupper(mo),
fullname = family,
genus = "",
species = "",
subspecies = "",
rank = "family",
species_id = "",
snomed = NA,
ref = NA_character_),
MOs %>%
group_by(order) %>%
filter(!any(rank == "order") & n() > 1) %>%
ungroup() %>%
arrange(order) %>%
distinct(order, .keep_all = TRUE) %>%
filter(!order %in% c("", NA), source != "manually added") %>%
mutate(mo = paste0(substr(kingdom, 1, 1), "_[ORD]_",
abbreviate(order,
minlength = 8,
use.classes = TRUE,
method = "both.sides",
strict = FALSE)),
mo = toupper(mo),
fullname = order,
family = "",
genus = "",
species = "",
subspecies = "",
rank = "order",
species_id = "",
snomed = NA,
ref = NA_character_)
) %>%
arrange(fullname)
# clean snomed
for (i in 1:nrow(MOs)) {
sno <- as.character(sort(unique(tolower(MOs[i, "snomed"][[1]]))))
if (length(sno) > 0) {
MOs[i, "snomed"][[1]] <- ifelse(length(sno[!sno == ""]) == 0, list(""), list(sno))
}
}
# Merge synonyms ----------------------------------------------------------
# remove synonyms that are now valid names

Binary file not shown.

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9018</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>
@ -192,6 +192,7 @@
<div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1>
<h4 class="date">05 March 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div>
@ -208,22 +209,22 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<div id="microorganisms-currently-accepted-names" class="section level2">
<h2 class="hasAnchor">
<a href="#microorganisms-currently-accepted-names" class="anchor"></a>Microorganisms (currently accepted names)</h2>
<p>A data set with 67,151 rows and 16 columns, containing the following column names:<br><em>class</em>, <em>family</em>, <em>fullname</em>, <em>genus</em>, <em>kingdom</em>, <em>mo</em>, <em>order</em>, <em>phylum</em>, <em>prevalence</em>, <em>rank</em>, <em>ref</em>, <em>snomed</em>, <em>source</em>, <em>species</em>, <em>species_id</em> and <em>subspecies</em>.</p>
<p>A data set with 70,026 rows and 16 columns, containing the following column names:<br><em>class</em>, <em>family</em>, <em>fullname</em>, <em>genus</em>, <em>kingdom</em>, <em>mo</em>, <em>order</em>, <em>phylum</em>, <em>prevalence</em>, <em>rank</em>, <em>ref</em>, <em>snomed</em>, <em>source</em>, <em>species</em>, <em>species_id</em> and <em>subspecies</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 3 September 2020 20:59:45 CEST. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p>It was last updated on 5 March 2021 01:01:21 CET. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.rds">R file</a> (2.7 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.rds">R file</a> (2.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.xlsx">Excel file</a> (6.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.xlsx">Excel file</a> (6.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.txt">plain text file</a> (13.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.txt">plain text file</a> (13.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sas">SAS file</a> (26.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sas">SAS file</a> (27.4 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sav">SPSS file</a> (28.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.sav">SPSS file</a> (29.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.dta">Stata file</a> (25.2 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.dta">Stata file</a> (26.9 MB)</li>
</ul>
<div id="source" class="section level3">
<h3 class="hasAnchor">
@ -233,7 +234,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<li>
<a href="http://www.catalogueoflife.org">Catalogue of Life</a> (included version: 2019)</li>
<li>
<a href="https://lpsn.dsmz.de">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, included version: May 2020)</li>
<a href="https://lpsn.dsmz.de">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, included version: )</li>
</ul>
</div>
<div id="example-content" class="section level3">
@ -256,15 +257,15 @@ If you are reading this page from within R, please <a href="https://msberends.gi
</tr>
<tr class="odd">
<td align="center">Archaea</td>
<td align="center">697</td>
<td align="center">694</td>
</tr>
<tr class="even">
<td align="center">Bacteria</td>
<td align="center">19,244</td>
<td align="center">22,118</td>
</tr>
<tr class="odd">
<td align="center">Chromista</td>
<td align="center">32,164</td>
<td align="center">32,167</td>
</tr>
<tr class="even">
<td align="center">Fungi</td>
@ -415,7 +416,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">species</td>
<td align="center">Liu et al., 2015</td>
<td align="center">792928</td>
<td align="center">DSMZ</td>
<td align="center">LPSN</td>
<td align="center">1</td>
<td align="center"></td>
</tr>
@ -426,23 +427,23 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<div id="microorganisms-previously-accepted-names" class="section level2">
<h2 class="hasAnchor">
<a href="#microorganisms-previously-accepted-names" class="anchor"></a>Microorganisms (previously accepted names)</h2>
<p>A data set with 12,708 rows and 4 columns, containing the following column names:<br><em>fullname</em>, <em>fullname_new</em>, <em>prevalence</em> and <em>ref</em>.</p>
<p>A data set with 14,100 rows and 4 columns, containing the following column names:<br><em>fullname</em>, <em>fullname_new</em>, <em>prevalence</em> and <em>ref</em>.</p>
<p><strong>Note:</strong> remember that the ref columns contains the scientific reference to the old taxonomic entries, i.e. of column <em>fullname</em>. For the scientific reference of the new names, i.e. of column <em>fullname_new</em>, see the <code>microorganisms</code> data set.</p>
<p>This data set is in R available as <code>microorganisms.old</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 28 May 2020 11:17:56 CEST. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p>It was last updated on 4 March 2021 22:23:58 CET. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.old.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.rds">R file</a> (0.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.rds">R file</a> (0.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.xlsx">Excel file</a> (0.4 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.xlsx">Excel file</a> (0.5 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.txt">plain text file</a> (0.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.txt">plain text file</a> (0.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sas">SAS file</a> (1.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sas">SAS file</a> (2.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sav">SPSS file</a> (1.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.sav">SPSS file</a> (2.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.dta">Stata file</a> (1.8 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/microorganisms.old.dta">Stata file</a> (2 MB)</li>
</ul>
<div id="source-1" class="section level3">
<h3 class="hasAnchor">
@ -452,7 +453,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<li>
<a href="http://www.catalogueoflife.org">Catalogue of Life</a> (included version: 2019)</li>
<li>
<a href="https://lpsn.dsmz.de">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, included version: May 2020)</li>
<a href="https://lpsn.dsmz.de">List of Prokaryotic names with Standing in Nomenclature</a> (LPSN, included version: )</li>
</ul>
</div>
<div id="example-content-1" class="section level3">
@ -789,10 +790,10 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<a href="#intrinsic-bacterial-resistance" class="anchor"></a>Intrinsic bacterial resistance</h2>
<p>A data set with 93,892 rows and 2 columns, containing the following column names:<br><em>antibiotic</em> and <em>microorganism</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 24 September 2020 00:50:35 CEST. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p>It was last updated on 4 March 2021 22:25:17 CET. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.rds">R file</a> (67 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.rds">R file</a> (69 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/intrinsic_resistant.xlsx">Excel file</a> (0.9 MB)<br>
</li>
@ -1004,7 +1005,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<a href="#interpretation-from-mic-values-disk-diameters-to-rsi" class="anchor"></a>Interpretation from MIC values / disk diameters to R/SI</h2>
<p>A data set with 20,486 rows and 10 columns, containing the following column names:<br><em>ab</em>, <em>breakpoint_R</em>, <em>breakpoint_S</em>, <em>disk_dose</em>, <em>guideline</em>, <em>method</em>, <em>mo</em>, <em>ref_tbl</em>, <em>site</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>It was last updated on 4 March 2021 22:24:46 CET. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds">R file</a> (34 kB)<br>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -43,7 +43,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>
@ -236,13 +236,13 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="amr-1509028" class="section level1">
<h1 class="page-header" data-toc-text="1.5.0.9028">
<a href="#amr-1509028" class="anchor"></a>AMR 1.5.0.9028<small> Unreleased </small>
<div id="amr-1509029" class="section level1">
<h1 class="page-header" data-toc-text="1.5.0.9029">
<a href="#amr-1509029" class="anchor"></a>AMR 1.5.0.9029<small> Unreleased </small>
</h1>
<div id="last-updated-4-march-2021" class="section level2">
<div id="last-updated-5-march-2021" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-4-march-2021" class="anchor"></a><small>Last updated: 4 March 2021</small>
<a href="#last-updated-5-march-2021" class="anchor"></a><small>Last updated: 5 March 2021</small>
</h2>
<div id="new" class="section level3">
<h3 class="hasAnchor">
@ -280,7 +280,7 @@
</li>
<li><p>Support for custom MDRO guidelines, using the new <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><a href="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p>Function <code><a href="../reference/isolate_identifier.html">isolate_identifier()</a></code>, which will paste a microorganism code with all antimicrobial results of a data set into one string for each row. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available.</p></li>
<li><p><code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li>
<li><p><code>ggplot()</code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li>
<li>
<p>Function <code><a href="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
@ -320,7 +320,7 @@
<li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li>
<li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> on any vector of MIC and disk diffusion values</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code>ggplot()</code> on any vector of MIC and disk diffusion values</li>
</ul>
</li>
<li>
@ -675,7 +675,7 @@
<p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
<p>Negative effects of this change are:</p>
<ul>
<li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>.</li>
<li>Function <code>freq()</code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code>freq()</code>.</li>
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code>&lt;ord&gt;</code>, not <code>&lt;rsi&gt;</code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
@ -1012,7 +1012,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co">#&gt; invalid microorganism code, NA generated</span></code></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li>
<li><p>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul>
</div>
@ -1281,7 +1281,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code>
</li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>):
<li>Frequency tables (<code>freq()</code>):
<ul>
<li><p>speed improvement for microbial IDs</p></li>
<li><p>fixed factor level names for R Markdown</p></li>
@ -1291,12 +1291,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># grouped boxplots:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</li>
</ul>
@ -1306,7 +1306,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
<li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> for when all values are <code>NA</code>
<li>Fix for <code>freq()</code> for when all values are <code>NA</code>
</li>
<li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1547,7 +1547,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</ul>
</li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function):
<li>Frequency tables (<code>freq()</code> function):
<ul>
<li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
@ -1557,15 +1557,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># OLD WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
<span class="co"># NEW WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
<span class="co"># Even supports grouping variables:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The argument <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1648,7 +1648,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below argument <code>minimum</code></p></li>
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
<li>
<p>Frequency tables - <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>:</p>
<p>Frequency tables - <code>freq()</code>:</p>
<ul>
<li>
<p>Support for grouping variables, test with:</p>
@ -1656,14 +1656,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li>
<li>
<p>Support for (un)selecting columns:</p>
<div class="sourceCode" id="cb39"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></code></pre></div>
</li>
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li>
@ -1681,7 +1681,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
<li><p>Fix for <code>mo_property</code> not working properly</p></li>
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">top_freq()</a></code></p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code>top_freq()</code></p></li>
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1849,13 +1849,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<div class="sourceCode" id="cb46"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
<p>For lists, subsetting is possible:</p>
<div class="sourceCode" id="cb47"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li>
</ul>
</div>
@ -1929,13 +1929,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<li>A vignette to explain its usage</li>
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(table(x, y))</a></code>
<li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
</li>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><a href="https://rdrr.io/r/graphics/hist.html">hist(freq(df$age))</a></code>
</li>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
</li>
<li>Support for quasiquotation: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %&gt;% freq(mycolumn)</code>
<li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %&gt;% freq(mycolumn)</code>
</li>
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li>
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2021-03-04T22:22Z
last_built: 2021-03-05T00:31Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>
@ -256,7 +256,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>Included are:</p><ul>
<li><p>All ~57,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa</p></li>
<li><p>All ~58,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa</p></li>
<li><p>All ~5,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as ~4,600 other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (such as all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
<li><p>All ~2,200 (sub)species from ~50 other relevant genera from the kingdom of Animalia (such as <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
<li><p>All ~14,000 previously accepted names of all included (sub)species (these were taxonomically renamed)</p></li>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>
@ -272,7 +272,7 @@
<td>
<p><code><a href="microorganisms.html">microorganisms</a></code> </p>
</td>
<td><p>Data Set with 69,625 Microorganisms</p></td>
<td><p>Data Set with 70,026 Microorganisms</p></td>
</tr><tr>
<td>

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data Set with 69,625 Microorganisms — microorganisms • AMR (for R)</title>
<title>Data Set with 70,026 Microorganisms — microorganisms • AMR (for R)</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@ -48,7 +48,7 @@
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
<meta property="og:title" content="Data Set with 69,625 Microorganisms — microorganisms" />
<meta property="og:title" content="Data Set with 70,026 Microorganisms — microorganisms" />
<meta property="og:description" content="A data set containing the microbial taxonomy, last updated in March 2021, of six kingdoms from the Catalogue of Life (CoL) and the List of Prokaryotic names with Standing in Nomenclature (LPSN). MO codes can be looked up using as.mo()." />
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>
@ -233,7 +233,7 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Data Set with 69,625 Microorganisms</h1>
<h1>Data Set with 70,026 Microorganisms</h1>
<small class="dont-index">Source: <a href='https://github.com/msberends/AMR/blob/master/R/data.R'><code>R/data.R</code></a></small>
<div class="hidden name"><code>microorganisms.Rd</code></div>
</div>
@ -247,7 +247,7 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a> with 69,625 observations and 16 variables:</p><ul>
<p>A <a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a> with 70,026 observations and 16 variables:</p><ul>
<li><p><code>mo</code><br /> ID of microorganism as used by this package</p></li>
<li><p><code>fullname</code><br /> Full name, like <code>"Escherichia coli"</code></p></li>
<li><p><code>kingdom</code>, <code>phylum</code>, <code>class</code>, <code>order</code>, <code>family</code>, <code>genus</code>, <code>species</code>, <code>subspecies</code><br /> Taxonomic rank of the microorganism</p></li>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9028</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.5.0.9029</span>
</span>
</div>

View File

@ -18,7 +18,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
Included are:
\itemize{
\item All ~57,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
\item All ~58,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
\item All ~5,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as ~4,600 other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (such as all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).
\item All ~2,200 (sub)species from ~50 other relevant genera from the kingdom of Animalia (such as \emph{Strongyloides} and \emph{Taenia})
\item All ~14,000 previously accepted names of all included (sub)species (these were taxonomically renamed)

View File

@ -3,9 +3,9 @@
\docType{data}
\name{microorganisms}
\alias{microorganisms}
\title{Data Set with 69,625 Microorganisms}
\title{Data Set with 70,026 Microorganisms}
\format{
A \link{data.frame} with 69,625 observations and 16 variables:
A \link{data.frame} with 70,026 observations and 16 variables:
\itemize{
\item \code{mo}\cr ID of microorganism as used by this package
\item \code{fullname}\cr Full name, like \code{"Escherichia coli"}

View File

@ -1,5 +1,6 @@
---
title: "Data sets for download / own use"
date: '`r format(Sys.Date(), "%d %B %Y")`'
output:
rmarkdown::html_vignette:
toc: true