1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:46:11 +01:00

remove reshape2 dependency

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-07-30 01:18:40 +02:00
parent 510e8f22aa
commit 211e3bae14
4 changed files with 25 additions and 15 deletions

View File

@ -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:

View File

@ -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),

View File

@ -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

View File

@ -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') {