mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
speed improvement is.rsi.eligible
This commit is contained in:
1 parent
40a159e78d
commit
d0bc05e5b1
4 files changed
+57
-17
No files matched your search
@@ -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