added boxplot for (grouped) freq()

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-05-29 19:56:17 +02:00
1 parent 62e6f41961
commit 8b5e2b030b
20 files changed
+464 -297

No files matched your search

+7 -2
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 %>%