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

added boxplot for (grouped) freq()

This commit is contained in:
2019-05-29 19:56:17 +02:00
parent 62e6f41961
commit 8b5e2b030b
20 changed files with 464 additions and 297 deletions

View File

@ -47,7 +47,10 @@ test_that("frequency table works", {
expect_output(print(freq(septic_patients$age, markdown = TRUE, title = "TITLE")))
# character
expect_output(suppressWarnings(print(freq(microorganisms$fullname))))
expect_output(print(freq(microorganisms$genus)))
expect_output(print(structure(freq(microorganisms$genus),
# check printing of old class:
class = c("frequency_tbl", "data.frame"))))
# mo
expect_output(print(freq(septic_patients$mo)))
# rsi
@ -121,9 +124,11 @@ test_that("frequency table works", {
# input must be freq tbl
expect_error(septic_patients %>% top_freq(1))
# charts from plot and hist, should not raise errors
# charts from plot, hist and boxplot, should not raise errors
plot(freq(septic_patients, age))
hist(freq(septic_patients, age))
boxplot(freq(septic_patients, age))
boxplot(freq(dplyr::group_by(septic_patients, gender), age))
# check vector
expect_identical(septic_patients %>%