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

grouping var for freq

This commit is contained in:
2018-11-06 16:41:59 +01:00
parent 54368fafef
commit 84e08f516a
6 changed files with 116 additions and 41 deletions

View File

@ -61,6 +61,9 @@ test_that("frequency table works", {
expect_output(septic_patients %>% select(1:9) %>% freq() %>% print())
expect_output(print(freq(septic_patients$age), nmax = 20))
# grouping variable
expect_output(print(septic_patients %>% group_by(gender) %>% freq(hospital_id)))
# top 5
expect_equal(
septic_patients %>%

View File

@ -56,7 +56,7 @@ test_that("mo_property works", {
# check vector with random values
library(dplyr)
df_sample <- AMR::microorganisms %>% sample_n(100)
expect_identical(df_sample %>% pull(mo) %>% mo_fullname(),
expect_identical(df_sample %>% pull(mo) %>% mo_fullname(language = "en"),
df_sample %>% pull(fullname))
})