1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 20:41:58 +02:00

ggplot_rsi improvements

This commit is contained in:
2018-08-13 16:42:37 +02:00
parent dba06c3295
commit 59ce1eb1b1
8 changed files with 140 additions and 67 deletions

View File

@ -29,16 +29,4 @@ test_that("ggplot_rsi works", {
summarise_all(portion_IR) %>% as.double()
)
expect_error(geom_rsi(x = "test"))
expect_error(facet_rsi(facet = "test"))
# support for groups
print(
septic_patients %>%
select(hospital_id, amox, cipr) %>%
group_by(hospital_id) %>%
ggplot_rsi() +
facet_grid("hospital_id")
)
})

View File

@ -111,7 +111,7 @@ test_that("old rsi works", {
# portion_df
expect_equal(
septic_patients %>% select(amox) %>% portion_df(TRUE) %>% pull(Percentage),
septic_patients %>% select(amox) %>% portion_df() %>% pull(Percentage),
c(septic_patients$amox %>% portion_S(),
septic_patients$amox %>% portion_I(),
septic_patients$amox %>% portion_R())