mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 21:22:01 +02:00
speed improvement is.rsi.eligible
This commit is contained in:
@ -19,4 +19,17 @@ test_that("rsi works", {
|
||||
"Sum IR" = "1",
|
||||
"-Sum R" = "1",
|
||||
"-Sum I" = "0"))
|
||||
|
||||
expect_identical(as.logical(lapply(septic_patients, is.rsi.eligible)),
|
||||
rep(FALSE, length(septic_patients)))
|
||||
|
||||
library(dplyr)
|
||||
# 40 rsi columns
|
||||
expect_identical(septic_patients %>%
|
||||
mutate_at(vars(peni:rifa), as.character) %>%
|
||||
lapply(is.rsi.eligible) %>%
|
||||
as.logical() %>%
|
||||
sum(),
|
||||
40)
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user