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:
@ -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")
|
||||
)
|
||||
|
||||
})
|
||||
|
@ -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())
|
||||
|
Reference in New Issue
Block a user