mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 18:46:13 +01:00
fixes
This commit is contained in:
parent
0062a3facb
commit
707aa20a37
@ -1,6 +1,10 @@
|
|||||||
image: jangorecki/r-base-dev
|
# from https://stackoverflow.com/questions/51866926
|
||||||
|
image: rocker/r-base
|
||||||
test:
|
test:
|
||||||
script:
|
script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install --yes --no-install-recommends r-cran-testthat r-cran-devtools
|
||||||
|
- R -e "devtools::install_deps()"
|
||||||
- R CMD build . --no-build-vignettes --no-manual
|
- R CMD build . --no-build-vignettes --no-manual
|
||||||
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
||||||
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual
|
||||||
|
@ -58,6 +58,7 @@ globalVariables(c(".",
|
|||||||
"Pasted",
|
"Pasted",
|
||||||
"patient_id",
|
"patient_id",
|
||||||
"prevalence",
|
"prevalence",
|
||||||
|
"psae",
|
||||||
"R",
|
"R",
|
||||||
"ref",
|
"ref",
|
||||||
"real_first_isolate",
|
"real_first_isolate",
|
||||||
|
5
R/mdro.R
5
R/mdro.R
@ -329,11 +329,6 @@ MDRO <- function(tbl,
|
|||||||
& rowSums(tbl[, aminoglycosides] == 'R', na.rm = TRUE) >= 1
|
& rowSums(tbl[, aminoglycosides] == 'R', na.rm = TRUE) >= 1
|
||||||
& rowSums(tbl[, fluoroquinolones] == 'R', na.rm = TRUE) >= 1
|
& rowSums(tbl[, fluoroquinolones] == 'R', na.rm = TRUE) >= 1
|
||||||
), 'MDRO'] <- 4
|
), 'MDRO'] <- 4
|
||||||
a <<- tbl[which(
|
|
||||||
tbl$family == 'Enterobacteriaceae'
|
|
||||||
& rowSums(tbl[, aminoglycosides] == 'R', na.rm = TRUE) >= 1
|
|
||||||
& rowSums(tbl[, fluoroquinolones] == 'R', na.rm = TRUE) >= 1
|
|
||||||
), ]
|
|
||||||
tbl[which(
|
tbl[which(
|
||||||
tbl$family == 'Enterobacteriaceae'
|
tbl$family == 'Enterobacteriaceae'
|
||||||
& rowSums(tbl[, carbapenems] == 'R', na.rm = TRUE) >= 1
|
& rowSums(tbl[, carbapenems] == 'R', na.rm = TRUE) >= 1
|
||||||
|
@ -67,13 +67,7 @@
|
|||||||
#' # get bacteria properties like genus and species
|
#' # get bacteria properties like genus and species
|
||||||
#' left_join_microorganisms("mo") %>%
|
#' left_join_microorganisms("mo") %>%
|
||||||
#' # calculate first isolates
|
#' # calculate first isolates
|
||||||
#' mutate(first_isolate =
|
#' mutate(first_isolate = first_isolate(.)) %>%
|
||||||
#' first_isolate(.,
|
|
||||||
#' "date",
|
|
||||||
#' "patient_id",
|
|
||||||
#' "mo",
|
|
||||||
#' col_specimen = NA,
|
|
||||||
#' col_icu = NA)) %>%
|
|
||||||
#' # filter on first E. coli isolates
|
#' # filter on first E. coli isolates
|
||||||
#' filter(genus == "Escherichia",
|
#' filter(genus == "Escherichia",
|
||||||
#' species == "coli",
|
#' species == "coli",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
\alias{EUCAST_exceptional_phenotypes}
|
\alias{EUCAST_exceptional_phenotypes}
|
||||||
\title{Determine multidrug-resistant organisms (MDRO)}
|
\title{Determine multidrug-resistant organisms (MDRO)}
|
||||||
\usage{
|
\usage{
|
||||||
MDRO(tbl, country = NULL, col_mo = "mo", info = TRUE,
|
MDRO(tbl, country = NULL, col_mo = NULL, info = TRUE,
|
||||||
amcl = "amcl", amik = "amik", amox = "amox", ampi = "ampi",
|
amcl = "amcl", amik = "amik", amox = "amox", ampi = "ampi",
|
||||||
azit = "azit", aztr = "aztr", cefa = "cefa", cfra = "cfra",
|
azit = "azit", aztr = "aztr", cefa = "cefa", cfra = "cfra",
|
||||||
cfep = "cfep", cfot = "cfot", cfox = "cfox", cfta = "cfta",
|
cfep = "cfep", cfot = "cfot", cfox = "cfox", cfta = "cfta",
|
||||||
@ -22,8 +22,7 @@ MDRO(tbl, country = NULL, col_mo = "mo", info = TRUE,
|
|||||||
peni = "peni", pita = "pita", poly = "poly", qida = "qida",
|
peni = "peni", pita = "pita", poly = "poly", qida = "qida",
|
||||||
rifa = "rifa", roxi = "roxi", siso = "siso", teic = "teic",
|
rifa = "rifa", roxi = "roxi", siso = "siso", teic = "teic",
|
||||||
tetr = "tetr", tica = "tica", tige = "tige", tobr = "tobr",
|
tetr = "tetr", tica = "tica", tige = "tige", tobr = "tobr",
|
||||||
trim = "trim", trsu = "trsu", vanc = "vanc",
|
trim = "trim", trsu = "trsu", vanc = "vanc", col_bactid = NULL)
|
||||||
col_bactid = "bactid")
|
|
||||||
|
|
||||||
BRMO(tbl, country = "nl", ...)
|
BRMO(tbl, country = "nl", ...)
|
||||||
|
|
||||||
|
@ -73,13 +73,7 @@ septic_patients \%>\%
|
|||||||
# get bacteria properties like genus and species
|
# get bacteria properties like genus and species
|
||||||
left_join_microorganisms("mo") \%>\%
|
left_join_microorganisms("mo") \%>\%
|
||||||
# calculate first isolates
|
# calculate first isolates
|
||||||
mutate(first_isolate =
|
mutate(first_isolate = first_isolate(.)) \%>\%
|
||||||
first_isolate(.,
|
|
||||||
"date",
|
|
||||||
"patient_id",
|
|
||||||
"mo",
|
|
||||||
col_specimen = NA,
|
|
||||||
col_icu = NA)) \%>\%
|
|
||||||
# filter on first E. coli isolates
|
# filter on first E. coli isolates
|
||||||
filter(genus == "Escherichia",
|
filter(genus == "Escherichia",
|
||||||
species == "coli",
|
species == "coli",
|
||||||
|
Loading…
Reference in New Issue
Block a user