mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 08:06:12 +01:00
(v0.7.1.9101) NEWS update, fix authors
This commit is contained in:
parent
c8f6b97847
commit
59af355a89
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.7.1.9100
|
Version: 0.7.1.9101
|
||||||
Date: 2019-10-08
|
Date: 2019-10-09
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
person(role = c("aut", "cre"),
|
person(role = c("aut", "cre"),
|
||||||
|
37
NEWS.md
37
NEWS.md
@ -1,5 +1,5 @@
|
|||||||
# AMR 0.7.1.9100
|
# AMR 0.7.1.9101
|
||||||
<small>Last updated: 08-Oct-2019</small>
|
<small>Last updated: 09-Oct-2019</small>
|
||||||
|
|
||||||
### Breaking
|
### Breaking
|
||||||
* Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`:
|
* Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`:
|
||||||
@ -26,33 +26,34 @@
|
|||||||
* Renamed data set `septic_patients` to `example_isolates`
|
* Renamed data set `septic_patients` to `example_isolates`
|
||||||
|
|
||||||
### New
|
### New
|
||||||
* Function `bug_drug_combinations()` to quickly get a `data.frame` with the antimicrobial resistance of any bug-drug combination in a data set. The columns with microorganism codes is guessed automatically and its input is transformed with `mo_shortname()` at default:
|
* Function `bug_drug_combinations()` to quickly get a `data.frame` with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with `mo_shortname()` at default:
|
||||||
```r
|
```r
|
||||||
x <- bug_drug_combinations(example_isolates)
|
x <- bug_drug_combinations(example_isolates)
|
||||||
# NOTE: Using column `mo` as input for `col_mo`.
|
#> NOTE: Using column `mo` as input for `col_mo`.
|
||||||
x[1:5, ]
|
x[1:4, ]
|
||||||
#> ab mo S I R total
|
#> mo ab S I R total
|
||||||
#> 1 AMC CoNS 178 0 132 310
|
#> 1 A. baumannii AMC 0 0 3 3
|
||||||
#> 2 AMC E. coli 332 74 61 467
|
#> 2 A. baumannii AMK 0 0 0 0
|
||||||
#> 3 AMC K. pneumoniae 49 3 6 58
|
#> 3 A. baumannii AMP 0 0 3 3
|
||||||
#> 4 AMC P. aeruginosa 0 0 30 30
|
#> 4 A. baumannii AMX 0 0 3 3
|
||||||
#> 5 AMC P. mirabilis 28 7 1 36
|
#> NOTE: Use 'format()' on this result to get a publicable/printable format.
|
||||||
|
|
||||||
# change the transformation with the FUN argument to anything you like:
|
# change the transformation with the FUN argument to anything you like:
|
||||||
x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain)
|
x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain)
|
||||||
# NOTE: Using column `mo` as input for `col_mo`.
|
#> NOTE: Using column `mo` as input for `col_mo`.
|
||||||
x[1:4, ]
|
x[1:4, ]
|
||||||
#> ab mo S I R total
|
#> mo ab S I R total
|
||||||
#> 1 AMC Gram-negative 469 89 174 732
|
#> 1 Gram-negative AMC 469 89 174 732
|
||||||
#> 2 AMC Gram-positive 873 2 272 1147
|
#> 2 Gram-negative AMK 251 0 2 253
|
||||||
#> 3 AMK Gram-negative 251 0 2 253
|
#> 3 Gram-negative AMP 227 0 405 632
|
||||||
#> 4 AMK Gram-positive 0 0 100 100
|
#> 4 Gram-negative AMX 227 0 405 632
|
||||||
|
#> NOTE: Use 'format()' on this result to get a publicable/printable format.
|
||||||
```
|
```
|
||||||
You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R `format()` function:
|
You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R `format()` function:
|
||||||
```r
|
```r
|
||||||
format(x, combine_IR = FALSE)
|
format(x, combine_IR = FALSE)
|
||||||
```
|
```
|
||||||
* Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the `portion` and `count` help pages), where the %SI is being determined:
|
* Additional way to calculate co-resistance, i.e. when using multiple antimicrobials as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibility of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the `portion` and `count` help pages), where the %SI is being determined:
|
||||||
|
|
||||||
```r
|
```r
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
@ -189,8 +189,14 @@ MOs <- MOs %>%
|
|||||||
authors),
|
authors),
|
||||||
# fix beginning and ending
|
# fix beginning and ending
|
||||||
ref = gsub(", $", "", ref),
|
ref = gsub(", $", "", ref),
|
||||||
ref = gsub("^, ", "", ref)
|
ref = gsub("^, ", "", ref),
|
||||||
|
ref = gsub("^(emend|et al.,?)", "", ref),
|
||||||
|
ref = trimws(ref)
|
||||||
)
|
)
|
||||||
|
# a lot start with a lowercase character - fix that
|
||||||
|
MOs$ref[!grepl("^d[A-Z]", MOs$ref)] <- gsub("^([a-z])", "\\U\\1", MOs$ref[!grepl("^d[A-Z]", MOs$ref)], perl = TRUE)
|
||||||
|
# specific one for the French that are named dOrbigny
|
||||||
|
MOs$ref[grepl("^d[A-Z]", MOs$ref)] <- gsub("^d", "d'", MOs$ref[grepl("^d[A-Z]", MOs$ref)])
|
||||||
|
|
||||||
# Remove non-ASCII characters (these are not allowed by CRAN)
|
# Remove non-ASCII characters (these are not allowed by CRAN)
|
||||||
MOs <- MOs %>%
|
MOs <- MOs %>%
|
||||||
|
Binary file not shown.
@ -84,7 +84,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
<a class="navbar-link" href="https://msberends.gitlab.io/AMR/index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9100</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9101</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<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">0.7.1.9100</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9101</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pandoc: 2.3.1
|
pandoc: []
|
||||||
pkgdown: 1.4.1
|
pkgdown: 1.4.1
|
||||||
pkgdown_sha: ~
|
pkgdown_sha: ~
|
||||||
articles:
|
articles:
|
||||||
|
Loading…
Reference in New Issue
Block a user