From 211e3bae143adb5900ad34815c144e8e51ce87a9 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Mon, 30 Jul 2018 01:18:40 +0200 Subject: [PATCH] remove reshape2 dependency --- .travis.yml | 12 ++++++++---- DESCRIPTION | 5 ++--- NEWS.md | 2 +- R/bactid.R | 21 ++++++++++++++------- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index be9022e0..444b597d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -2,18 +2,21 @@ language: r jobs: include: - - r: 3.1 + - r: 3.0 os: linux warnings_are_errors: false + - r: 3.0 + os: osx + warnings_are_errors: false + - r: 3.1 + os: linux - r: 3.1 os: osx warnings_are_errors: false - r: 3.2 os: linux - warnings_are_errors: false - r: 3.2 os: osx - warnings_are_errors: false - r: 3.3 os: linux - r: 3.3 @@ -43,12 +46,13 @@ cran: https://cran.rstudio.com before_install: # needed for clipboard function: # - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -qq update; fi - - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -y xclip; fi + # - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -y xclip; fi - if [ $TRAVIS_OS_NAME = osx ]; then brew install xclip; fi - if [ $TRAVIS_OS_NAME = osx ]; then brew install libgit2; fi # postrun after_success: + # only run on osx, so clipboard functions can be checked - if [ $TRAVIS_OS_NAME = osx ]; then Rscript -e 'covr::codecov()'; fi notifications: email: diff --git a/DESCRIPTION b/DESCRIPTION index 5e206ebb..df6100cc 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.2.0.9017 -Date: 2018-07-28 +Version: 0.2.0.9018 +Date: 2018-07-30 Title: Antimicrobial Resistance Analysis Authors@R: c( person( @@ -31,7 +31,6 @@ Imports: clipr, curl, dplyr (>= 0.7.0), - reshape2 (>= 1.4.0), xml2 (>= 1.0.0), knitr (>= 1.0.0), Rcpp (>= 0.12.14), diff --git a/NEWS.md b/NEWS.md index 210f2071..2115ce73 100755 --- a/NEWS.md +++ b/NEWS.md @@ -28,7 +28,7 @@ #### Changed * Improvements for forcasting with `resistance_predict` and added more examples * More antibiotics for EUCAST rules -* Updated version of the `setic_patients` data set to better reflect the reality +* Updated version of the `septic_patients` data set to better reflect the reality * Pretty printing for tibbles removed as it is not really the scope of this package * Improved speed of key antibiotics comparison for determining first isolates * Column names for the `key_antibiotics` function are now generic: 6 for broadspectrum ABs, 6 for Gram-positive specific and 6 for Gram-negative specific ABs diff --git a/R/bactid.R b/R/bactid.R index 868aa09c..ba677b59 100644 --- a/R/bactid.R +++ b/R/bactid.R @@ -126,23 +126,27 @@ as.bactid <- function(x) { } if (tolower(x[i]) == '^h.*influenzae$') { # avoid detection of Haematobacter influenzae in case of H. influenzae - x[i] <- 'Haemophilus influenzae' + x[i] <- 'HAEINF' + next } if (tolower(x[i]) == '^st.*au$' | tolower(x[i]) == '^stau$' | tolower(x[i]) == '^staaur$') { # avoid detection of Staphylococcus auricularis in case of S. aureus - x[i] <- 'Staphylococcus aureus' + x[i] <- 'STAAUR' + next } if (tolower(x[i]) == '^p.*aer$') { # avoid detection of Pasteurella aerogenes in case of Pseudomonas aeruginosa - x[i] <- 'Pseudomonas aeruginosa' + x[i] <- 'PSEAER' + next } if (tolower(x[i]) %like% 'coagulase' | tolower(x[i]) %like% 'cns' | tolower(x[i]) %like% 'cons') { # coerce S. coagulase negative, also as CNS and CoNS - x[i] <- 'Coagulase Negative Staphylococcus (CNS)' + x[i] <- 'STACNS' + next } # translate known trivial names to genus+species @@ -150,17 +154,20 @@ as.bactid <- function(x) { if (toupper(x.backup[i]) == 'MRSA' | toupper(x.backup[i]) == 'VISA' | toupper(x.backup[i]) == 'VRSA') { - x[i] <- 'Staphylococcus aureus' + x[i] <- 'STAAUR' + next } if (toupper(x.backup[i]) == 'MRSE') { x[i] <- 'Staphylococcus epidermidis' } if (toupper(x.backup[i]) == 'VRE') { - x[i] <- 'Enterococcus' + x[i] <- 'ENC' + next } if (toupper(x.backup[i]) == 'MRPA') { # multi resistant P. aeruginosa - x[i] <- 'Pseudomonas aeruginosa' + x[i] <- 'PSEAER' + next } if (toupper(x.backup[i]) == 'PISP' | toupper(x.backup[i]) == 'PRSP') {