Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Nov 22, 2023
1 parent 75880bf commit 96f423d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## rtables 0.6.5.9011
### New Features
* Removed `ref_group` reordering in column splits so not to change the order.
* Added `bold` argument to `as_html` to bold specified elements, and `header_sep_line`
argument to print a horizontal line under the table header in rendered HTML output.
* Section divisors can be set also for analysis rows.
* Added setter and getter for section dividers (`section_div` and `section_div<-`).
* Added setter and getter for section dividers (`section_div` and `section_div<-`). They accept also
split section structure assignment.
* Added `header_section_div` setters and getters for layout and table objects along with
related`basic_table` parameter.

### Bug Fixes
* Fixed a bug that was failing when wrapping and section dividers were used at the same time.
* Added `bold` argument to `as_html` to bold specified elements, and `header_sep_line` argument to print a horizontal line under the table header in rendered HTML output.

### Miscellaneous
* Applied `styler` and resolved package lint. Changed default indentation from 4 spaces to 2.
Expand Down
4 changes: 2 additions & 2 deletions R/00tabletrees.R
Original file line number Diff line number Diff line change
Expand Up @@ -1678,13 +1678,13 @@ TableTree <- function(kids = list(),
provenance_footer = prov_footer,
page_title_prefix = page_title,
horizontal_sep = "-",
header_section_div = NA_character_,
header_section_div = header_section_div,
trailing_section_div = trailing_section_div
) ## this is overridden below to get recursiveness
tab <- set_format_recursive(tab, format, na_str, FALSE)

## these is recursive
## XXX combine thse probably
## XXX combine these probably
horizontal_sep(tab) <- hsep
table_inset(tab) <- as.integer(inset)
tab
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ reference:
- brackets
- clear_indent_mods
- head
- section_div

- title: Validating and Fixing Table Structure
contents:
Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/test-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,11 @@ test_that("the split only setter works", {
section_div(tbl) <- c("a", "b")
expect_identical(section_div(tbl), replace_sec_div)


# multiple analyze
tbl <- basic_table() %>%
tbl <- basic_table(header_section_div = " ") %>%
split_cols_by("ARM") %>%
split_rows_by("SEX", split_fun = drop_split_levels) %>%
analyze("AGE") %>%
analyze("AGE")
split_rows_by("RACE", split_fun = drop_split_levels) %>%
split_rows_by("SEX", split_fun = drop_split_levels) %>%
analyze("AGE") %>%
Expand Down

0 comments on commit 96f423d

Please sign in to comment.