mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 09:11:51 +02:00
speed improvements
This commit is contained in:
@ -1,13 +1,19 @@
|
||||
context("clipboard.R")
|
||||
|
||||
test_that("clipboard works", {
|
||||
|
||||
if (!clipr::clipr_available() & Sys.info()['sysname'] == "Linux") {
|
||||
# try to support on X11, by setting the R variable DISPLAY
|
||||
Sys.setenv(DISPLAY = "localhost:10.0")
|
||||
}
|
||||
|
||||
skip_if_not(clipr::clipr_available())
|
||||
|
||||
clipboard_export(antibiotics)
|
||||
expect_identical(antibiotics,
|
||||
clipboard_import(date_format = "yyyy-mm-dd"))
|
||||
expect_identical(as.data.frame(antibiotics, stringsAsFactors = FALSE),
|
||||
clipboard_import())
|
||||
|
||||
clipboard_export(septic_patients[1:100,])
|
||||
expect_identical(tbl_parse_guess(septic_patients[1:100,]),
|
||||
clipboard_import(guess_col_types = TRUE))
|
||||
expect_identical(as.data.frame(tbl_parse_guess(septic_patients[1:100,]), stringsAsFactors = FALSE),
|
||||
clipboard_import(guess_col_types = TRUE, stringsAsFactors = FALSE))
|
||||
})
|
||||
|
@ -27,6 +27,12 @@ test_that("resistance works", {
|
||||
combination_n = n_rsi(cipr, gent)) %>%
|
||||
pull(combination_n),
|
||||
c(138, 474, 170, 464, 183))
|
||||
|
||||
expect_warning(resistance(as.character(septic_patients$amcl)))
|
||||
expect_warning(susceptibility(as.character(septic_patients$amcl)))
|
||||
expect_warning(susceptibility(as.character(septic_patients$amcl,
|
||||
septic_patients$gent)))
|
||||
|
||||
})
|
||||
|
||||
test_that("prediction of rsi works", {
|
||||
|
Reference in New Issue
Block a user