This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-01-05 21:40:04 +01:00
parent 73340f2ff8
commit 2c798547bf
10 changed files with 31 additions and 43 deletions

View File

@ -2,18 +2,21 @@
# TITLE # # TITLE #
# Antimicrobial Resistance (AMR) Analysis # # Antimicrobial Resistance (AMR) Analysis #
# # # #
# AUTHORS # # SOURCE #
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # https://gitlab.com/msberends/AMR #
# # # #
# LICENCE # # LICENCE #
# This package is free software; you can redistribute it and/or modify # # (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
# it under the terms of the GNU General Public License version 2.0, #
# as published by the Free Software Foundation. #
# # # #
# This R package is distributed in the hope that it will be useful, # # This R package is free software; you can freely use and distribute #
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # it for both personal and commercial purposes under the terms of the #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License version 2.0 (GNU GPL-2), as published by #
# GNU General Public License version 2.0 for more details. # # the Free Software Foundation. #
# #
# This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. #
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== # # ==================================================================== #
install_if_needed <- function(pkg, repos, quiet) { install_if_needed <- function(pkg, repos, quiet) {
@ -43,14 +46,4 @@ gl_update_pkg_all <- function(repos = "https://cran.rstudio.com",
print(instld[, c("Package", "Version")]) print(instld[, c("Package", "Version")])
return(invisible(TRUE)) return(invisible(TRUE))
# which ones are needed now?
# pkg_needed <-
# if (length(pkg_needed) > 0) {
# # install them
# for (i %in% 1:length(pkg_needed)) {
# install_if_needed(pkg = pkg_needed[i], repos = repos, quiet = quiet)
# }
# }
} }

View File

@ -19,23 +19,18 @@
# Visit our website for more info: https://msberends.gitab.io/AMR. # # Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== # # ==================================================================== #
# from https://stackoverflow.com/questions/51866926
# and https://github.com/jangorecki/r.gitlab.ci
# and https://docs.gitlab.com/ce/ci/yaml/README.html
# how the Docker+R images work: https://hub.docker.com/r/rocker/r-ver/
stages: stages:
- build - build
- test - test
- deploy - deploy
# stretch only contains R 3.3 # debian stretch only contains R 3.3...
image: debian:buster-slim image: debian:buster-slim
before_script: before_script:
- apt-get update -qq - apt-get update -qq
# install dependencies for packages # install dependencies for packages
- apt-get -y install -qq locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev pandoc r-base - apt-get install -qq locales libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev pandoc r-base
# set R system language # set R system language
- echo "LC_ALL=en_US.UTF-8" >> /etc/environment - echo "LC_ALL=en_US.UTF-8" >> /etc/environment
- echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
@ -47,8 +42,11 @@ before_script:
- echo 'R_LIBS_USER="installed_deps"' >> .Renviron - echo 'R_LIBS_USER="installed_deps"' >> .Renviron
- echo 'R_LIBS_SITE="installed_deps"' >> .Renviron - echo 'R_LIBS_SITE="installed_deps"' >> .Renviron
- echo 'LANGUAGE="en_US.utf8"' >> .Renviron - echo 'LANGUAGE="en_US.utf8"' >> .Renviron
- echo 'LANG="en_US.utf8"' >> .Renviron
- echo 'LANGUAGE="en_US.utf8"' > ~/.Renviron
#- Rscript -e '.libPaths()' #- Rscript -e '.libPaths()'
# install missing and outdated packages # install missing and outdated packages
- Rscript -e 'Sys.setlocale("LC_ALL", "en_US.UTF-8"); sessionInfo()'
- Rscript -e 'sessionInfo()' - Rscript -e 'sessionInfo()'
- Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)' - Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE)'

View File

@ -338,7 +338,6 @@
* Function `guess_atc` to **determine the ATC** of an antibiotic based on name, trade name, or known abbreviations * Function `guess_atc` to **determine the ATC** of an antibiotic based on name, trade name, or known abbreviations
* Function `freq` to create **frequency tables**, with additional info in a header * Function `freq` to create **frequency tables**, with additional info in a header
* Function `MDRO` to **determine Multi Drug Resistant Organisms (MDRO)** with support for country-specific guidelines. * Function `MDRO` to **determine Multi Drug Resistant Organisms (MDRO)** with support for country-specific guidelines.
* Suggest your own via [https://github.com/msberends/AMR/issues/new](https://github.com/msberends/AMR/issues/new?title=New%20guideline%20for%20MDRO&body=%3C--%20Please%20add%20your%20country%20code,%20guideline%20name,%20version%20and%20source%20below%20and%20remove%20this%20line--%3E)
* [Exceptional resistances defined by EUCAST](http://www.eucast.org/expert_rules_and_intrinsic_resistance) are also supported instead of countries alone * [Exceptional resistances defined by EUCAST](http://www.eucast.org/expert_rules_and_intrinsic_resistance) are also supported instead of countries alone
* Functions `BRMO` and `MRGN` are wrappers for Dutch and German guidelines, respectively * Functions `BRMO` and `MRGN` are wrappers for Dutch and German guidelines, respectively
* New algorithm to determine weighted isolates, can now be `"points"` or `"keyantibiotics"`, see `?first_isolate` * New algorithm to determine weighted isolates, can now be `"points"` or `"keyantibiotics"`, see `?first_isolate`

View File

@ -23,7 +23,7 @@
#' #'
#' Welcome to the \code{AMR} package. This page gives some additional contact information about the authors. #' Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
#' @details #' @details
#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods. #' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
#' #'
#' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). #' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
#' @section Read more on our website!: #' @section Read more on our website!:

View File

@ -2,11 +2,9 @@
*NOTE: the original source code is on GitLab (https://gitlab.com/msberends/AMR), so you can report a bug at https://gitlab.com/msberends/AMR/issues. There is a mirror repository on GitHub (https://github.com/msberends/AMR). As the mirror process is automated by GitLab, both repositories always contain the latest changes.* *NOTE: the original source code is on GitLab (https://gitlab.com/msberends/AMR), so you can report a bug at https://gitlab.com/msberends/AMR/issues. There is a mirror repository on GitHub (https://github.com/msberends/AMR). As the mirror process is automated by GitLab, both repositories always contain the latest changes.*
----
## Development source ## Development source
This is the **development source** of `AMR`, a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with antibiotic properties by using evidence-based methods. This is the **development source** of `AMR`, a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
**Not a developer? Then our website https://msberends.gitlab.io/AMR is probably a better place to read about this package.** It contains documentation about all of the included functions and also a comprehensive tutorial about how to conduct AMR analysis. **Not a developer? Then our website https://msberends.gitlab.io/AMR is probably a better place to read about this package.** It contains documentation about all of the included functions and also a comprehensive tutorial about how to conduct AMR analysis.

View File

@ -175,8 +175,8 @@
</h1></div> </h1></div>
<p><em>(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a>.</em></p> <p><em>(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a>.</em></p>
<hr> <hr>
<p><code>AMR</code> is a free and open-source <a href="https://www.r-project.org">R package</a> to simplify the analysis and prediction of <strong>Antimicrobial Resistance (AMR)</strong> and to work with antibiotic properties by using evidence-based methods.</p> <p><code>AMR</code> is a free and open-source <a href="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 properties by using evidence-based methods.</p>
<p>We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). We released this under the GNU General Public Licence v2.0 (GPL-2) which makes it free for everybody to use and distribute, for personal and commercial use, but it may <strong>not</strong> be used for patent purposes. Read further about our GPL-2 licence <a href="./LICENSE-text.html">here</a>.</p> <p>We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is free software; you can freely use and distribute it for both personal and commercial (but <strong>not</strong> patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read further about our GPL-2 licence <a href="./LICENSE-text.html">here</a>.</p>
<p>This package is ready-to-use for a professional environment by specialists in the following fields:</p> <p>This package is ready-to-use for a professional environment by specialists in the following fields:</p>
<p>Medical Microbiology:</p> <p>Medical Microbiology:</p>
<ul> <ul>
@ -214,7 +214,7 @@
<div id="get-this-package" class="section level3"> <div id="get-this-package" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#get-this-package" class="anchor"></a>Get this package</h3> <a href="#get-this-package" class="anchor"></a>Get this package</h3>
<p>This package is available on the official R network. Install this package in R with:</p> <p>This package is available on the official R network (CRAN). Install this package in R with:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</code></pre></div> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</code></pre></div>
<p>It will be downloaded and installed automatically.</p> <p>It will be downloaded and installed automatically.</p>
</div> </div>
@ -257,7 +257,7 @@
<li>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</li> <li>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</li>
</ol> </ol>
<ul> <ul>
<li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code><a href="reference/portion.html">portion_R()</a></code>, <code><a href="reference/portion.html">portion_IR()</a></code>, <code><a href="reference/portion.html">portion_I()</a></code>, <code><a href="reference/portion.html">portion_SI()</a></code> and <code><a href="reference/portion.html">portion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_R()</a></code>, <code><a href="reference/count.html">count_IR()</a></code>, <code><a href="reference/count.html">count_I()</a></code>, <code><a href="reference/count.html">count_SI()</a></code> and <code><a href="reference/count.html">count_S()</a></code> functions. All these functions can be used <a href="https://dplyr.tidyverse.org/#usage">with the <code>dplyr</code> package</a> (e.g. in conjunction with <a href="https://dplyr.tidyverse.org/reference/summarise.html"><code>summarise</code></a>)</li> <li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code><a href="reference/portion.html">portion_R()</a></code>, <code><a href="reference/portion.html">portion_IR()</a></code>, <code><a href="reference/portion.html">portion_I()</a></code>, <code><a href="reference/portion.html">portion_SI()</a></code> and <code><a href="reference/portion.html">portion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_R()</a></code>, <code><a href="reference/count.html">count_IR()</a></code>, <code><a href="reference/count.html">count_I()</a></code>, <code><a href="reference/count.html">count_SI()</a></code> and <code><a href="reference/count.html">count_S()</a></code> functions. All these functions can be used with the <code>dplyr</code> package (e.g. in conjunction with <code>summarise()</code>)</li>
<li>Plot AMR results with <code><a href="reference/ggplot_rsi.html">geom_rsi()</a></code>, a function made for the <code>ggplot2</code> package</li> <li>Plot AMR results with <code><a href="reference/ggplot_rsi.html">geom_rsi()</a></code>, a function made for the <code>ggplot2</code> package</li>
<li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code><a href="reference/resistance_predict.html">resistance_predict()</a></code> function</li> <li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code><a href="reference/resistance_predict.html">resistance_predict()</a></code> function</li>
<li>Conduct descriptive statistics to enhance base R: calculate <code><a href="reference/kurtosis.html">kurtosis()</a></code>, <code><a href="reference/skewness.html">skewness()</a></code> and create frequency tables with <code><a href="reference/freq.html">freq()</a></code> <li>Conduct descriptive statistics to enhance base R: calculate <code><a href="reference/kurtosis.html">kurtosis()</a></code>, <code><a href="reference/skewness.html">skewness()</a></code> and create frequency tables with <code><a href="reference/freq.html">freq()</a></code>

View File

@ -597,8 +597,6 @@
<li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li> <li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li>
<li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li> <li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li>
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.</li> <li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.</li>
<li>Suggest your own via <a href="https://github.com/msberends/AMR/issues/new?title=New%20guideline%20for%20MDRO&amp;body=%3C--%20Please%20add%20your%20country%20code,%20guideline%20name,%20version%20and%20source%20below%20and%20remove%20this%20line--%3E">https://github.com/msberends/AMR/issues/new</a>
</li>
<li> <li>
<a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance">Exceptional resistances defined by EUCAST</a> are also supported instead of countries alone</li> <a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance">Exceptional resistances defined by EUCAST</a> are also supported instead of countries alone</li>
<li>Functions <code>BRMO</code> and <code>MRGN</code> are wrappers for Dutch and German guidelines, respectively</li> <li>Functions <code>BRMO</code> and <code>MRGN</code> are wrappers for Dutch and German guidelines, respectively</li>

View File

@ -223,7 +223,7 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.</p> <p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.</p>
<p>This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).</p> <p>This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2> <h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -4,9 +4,10 @@
---- ----
`AMR` is a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of **Antimicrobial Resistance (AMR)** and to work with antibiotic properties by using evidence-based methods. `AMR` is a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). We released this under the GNU General Public Licence v2.0 (GPL-2) which makes it free for everybody to use and distribute, for personal and commercial use, but it may **not** be used for patent purposes. Read further about our GPL-2 licence [here](./LICENSE-text.html). We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
This R package is free software; you can freely use and distribute it for both personal and commercial (but **not** patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read further about our GPL-2 licence [here](./LICENSE-text.html).
This package is ready-to-use for a professional environment by specialists in the following fields: This package is ready-to-use for a professional environment by specialists in the following fields:
@ -45,7 +46,8 @@ Developers:
### Get this package ### Get this package
This package is available on the official R network. Install this package in R with: This package is available on the official R network (CRAN). Install this package in R with:
```r ```r
install.packages("AMR") install.packages("AMR")
``` ```
@ -84,7 +86,7 @@ The `AMR` package basically does four important things:
3. It **analyses the data** with convenient functions that use well-known methods. 3. It **analyses the data** with convenient functions that use well-known methods.
* Calculate the resistance (and even co-resistance) of microbial isolates with the `portion_R()`, `portion_IR()`, `portion_I()`, `portion_SI()` and `portion_S()` functions. Similarly, the *number* of isolates can be determined with the `count_R()`, `count_IR()`, `count_I()`, `count_SI()` and `count_S()` functions. All these functions can be used [with the `dplyr` package](https://dplyr.tidyverse.org/#usage) (e.g. in conjunction with [`summarise`](https://dplyr.tidyverse.org/reference/summarise.html)) * Calculate the resistance (and even co-resistance) of microbial isolates with the `portion_R()`, `portion_IR()`, `portion_I()`, `portion_SI()` and `portion_S()` functions. Similarly, the *number* of isolates can be determined with the `count_R()`, `count_IR()`, `count_I()`, `count_SI()` and `count_S()` functions. All these functions can be used with the `dplyr` package (e.g. in conjunction with `summarise()`)
* Plot AMR results with `geom_rsi()`, a function made for the `ggplot2` package * Plot AMR results with `geom_rsi()`, a function made for the `ggplot2` package
* Predict antimicrobial resistance for the nextcoming years using logistic regression models with the `resistance_predict()` function * Predict antimicrobial resistance for the nextcoming years using logistic regression models with the `resistance_predict()` function
* Conduct descriptive statistics to enhance base R: calculate `kurtosis()`, `skewness()` and create frequency tables with `freq()` * Conduct descriptive statistics to enhance base R: calculate `kurtosis()`, `skewness()` and create frequency tables with `freq()`

View File

@ -7,7 +7,7 @@
Welcome to the \code{AMR} package. This page gives some additional contact information about the authors. Welcome to the \code{AMR} package. This page gives some additional contact information about the authors.
} }
\details{ \details{
This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods. This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
} }