diff --git a/DESCRIPTION b/DESCRIPTION index 0d2024c69..9984042b2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rtables Title: Reporting Tables -Version: 0.6.10.9008 -Date: 2024-11-29 +Version: 0.6.10.9009 +Date: 2024-12-05 Authors@R: c( person("Gabriel", "Becker", , "gabembecker@gmail.com", role = "aut", comment = "Original creator of the package"), @@ -40,7 +40,7 @@ Imports: stats, stringi (>= 1.6) Suggests: - broom (>= 1.0.6), + broom (>= 1.0.5), car (>= 3.0-13), dplyr (>= 1.0.5), knitr (>= 1.42), diff --git a/NEWS.md b/NEWS.md index fb462942b..4f59a6de7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -## rtables 0.6.10.9008 +## rtables 0.6.10.9009 ### New Features * Experimental pagination is now possible in `tt_as_flextable()` and `export_as_docx()`. diff --git a/R/tt_as_df.R b/R/tt_as_df.R index 3cd69c5e3..c79ba4f3a 100644 --- a/R/tt_as_df.R +++ b/R/tt_as_df.R @@ -250,7 +250,7 @@ as_result_df <- function(tt, spec = NULL, stat_name <- lapply(seq_along(stat_name), function(sn_i) { stat_name[[sn_i]][seq_len(necessary_stat_lengths[sn_i])] }) - stat_name[sapply(stat_name, function(x) length(x) == 0)] <- NA + stat_name[!nzchar(stat_name)] <- NA # unnesting stat_name and stat tmp_ret_by_col_i <- NULL diff --git a/tests/testthat/test-result_data_frame.R b/tests/testthat/test-result_data_frame.R index 4eb09ce6f..bbc0a641d 100644 --- a/tests/testthat/test-result_data_frame.R +++ b/tests/testthat/test-result_data_frame.R @@ -240,7 +240,7 @@ test_that("as_result_df works fine with empty tables and no character(0) is allo ) }) -test_that("as_result_df works with only analyze tables (odd num of path elements)", { +test_that("as_result_df works with analyze-only tables (odd num of path elements)", { tbl <- basic_table() %>% analyze("cyl", table_names = "a") %>% analyze("mpg") %>%