Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f6c862b
not working yet, saving state
gmbecker Jun 16, 2026
c3a5bb1
Working POC, plenty of work still to do
gmbecker Jun 17, 2026
19e3cb5
POC working but only nested= NA
gmbecker Jun 18, 2026
c678449
missing split_rows_by rd
gmbecker Jun 18, 2026
b6b0e86
implement at_sibling API, some code reorg
gmbecker Jun 19, 2026
0376e10
not working yet, saving state
gmbecker Jun 16, 2026
a70ef41
Working POC, plenty of work still to do
gmbecker Jun 17, 2026
6804d2c
POC working but only nested= NA
gmbecker Jun 18, 2026
4623163
missing split_rows_by rd
gmbecker Jun 18, 2026
fe4c526
implement at_sibling API, some code reorg
gmbecker Jun 19, 2026
f3baa73
Merge remote-tracking branch 'origin/1095_intermediate_nesting' into …
gmbecker Jul 31, 2026
1624269
Merge remote-tracking branch 'origin/main' into 1095_intermediate_nes…
gmbecker Aug 7, 2026
2738e96
1095 intermediate nesting add tests + revert to roxygen 8.0.0 + fix (…
munoztd0 Aug 17, 2026
4c8aa55
Merge remote-tracking branch 'origin/1095_intermediate_nesting' into …
gmbecker Aug 17, 2026
0c5a093
mergee origin/1095_intermediate_netsting
gmbecker Aug 17, 2026
f96e34d
move dave's tests to new file, check if right roxygen
gmbecker Aug 17, 2026
ee17457
document at_sibling argument, roxygen version looks good
gmbecker Aug 17, 2026
6fda3d9
fix (ridiculously) compex nesting case. add more tests
gmbecker Aug 17, 2026
16870c0
Merge branch 'main' into 1095_intermediate_nesting
munoztd0 Aug 18, 2026
4c280fe
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Aug 24, 2026
11034c7
revert
munoztd0 Aug 24, 2026
568d0c1
to use path_count/ tt_normalize_row_path instead.
munoztd0 Aug 24, 2026
2f29b6d
[skip style] [skip vbump] Restyle files
github-actions[bot] Aug 24, 2026
fbd5f05
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Aug 24, 2026
0010009
fix typo
munoztd0 Aug 24, 2026
9ad87c6
Merge branch '1095_intermediate_nesting' of https://github.com/pharma…
munoztd0 Aug 24, 2026
0ecf34c
lints and remove :::first_spl_name
munoztd0 Aug 24, 2026
4365cf9
[skip style] [skip vbump] Restyle files
github-actions[bot] Aug 24, 2026
05f7cea
Merge branch 'main' into 1095_intermediate_nesting
shajoezhu Aug 25, 2026
861daba
Merge branch 'main' into 1095_intermediate_nesting
shajoezhu Aug 25, 2026
d9df5c3
fix: correct R indentation for lintr
Copilot Aug 25, 2026
dcf242d
fix: satisfy lintr indentation rules
Copilot Aug 25, 2026
69cd184
[skip style] [skip vbump] Restyle files
github-actions[bot] Aug 25, 2026
b15ba75
lints
munoztd0 Aug 25, 2026
50e0c62
Merge branch '1095_intermediate_nesting' of https://github.com/pharma…
munoztd0 Aug 25, 2026
7814d28
Update News.md
munoztd0 Aug 25, 2026
13be610
fix typo charactere(1)
munoztd0 Aug 31, 2026
be58071
Fix SplitVectorTree label position accessor missing
munoztd0 Aug 31, 2026
d0639ab
clean old commented code
munoztd0 Aug 31, 2026
5408ee6
fix typo: maintainer
munoztd0 Aug 31, 2026
a77cbcb
Added a root-level page_by = TRUE guard before
munoztd0 Aug 31, 2026
d4e652e
comment cleanup
gmbecker Sep 9, 2026
9b87f1c
Merge remote-tracking branch 'origin/1095_intermediate_nesting' into …
gmbecker Sep 9, 2026
5ced716
Update API, documentation for int. nesting
gmbecker Sep 11, 2026
a6ed9d2
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Sep 14, 2026
794af76
additional tests, export get_anchors_list
gmbecker Sep 14, 2026
ea638e0
Merge remote-tracking branch 'origin/1095_intermediate_nesting' into …
gmbecker Sep 14, 2026
f75e0e6
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 14, 2026
65666ef
nesting vignette done, more tests, algorithm refinement
gmbecker Sep 16, 2026
5979f76
update pkgdown
gmbecker Sep 16, 2026
c3a242c
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 16, 2026
2d0b70e
Apply suggestion from @munoztd0
munoztd0 Sep 17, 2026
9263e84
fix typos in docs
munoztd0 Sep 17, 2026
e07e755
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Sep 17, 2026
113440d
layout branching implementation v2 passing tests (incl new) and vigns
gmbecker Sep 21, 2026
1cd6eeb
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 21, 2026
32d5ff3
passing check clean
gmbecker Sep 23, 2026
6572eac
update pkgdown
gmbecker Sep 23, 2026
86ef568
styler pass
gmbecker Sep 23, 2026
b6a4c35
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 23, 2026
32ecda3
fix analysis compounding on branch
gmbecker Sep 23, 2026
a1420b3
[skip style] update SplitVector validity function
gmbecker Sep 23, 2026
4fb6498
reorg some of the int. nesting tests into smaller groups
gmbecker Sep 23, 2026
1b8c1f1
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 23, 2026
efc5354
add validity assertion on at_sibling, with some tests to exercise it
gmbecker Sep 23, 2026
2d16938
Merge remote-tracking branch 'origin/1095_intermediate_nesting' into …
gmbecker Sep 23, 2026
2719dc5
remove commented out old implementation
gmbecker Sep 23, 2026
39079aa
Merge branch 'main' into 1095_intermediate_nesting
shajoezhu Sep 26, 2026
35e8005
Merge branch 'main' into 1095_intermediate_nesting
shajoezhu Sep 26, 2026
82f370e
Merge branch 'main' into 1095_intermediate_nesting
shajoezhu Sep 27, 2026
f19d4de
fix lintr
shajoezhu Sep 27, 2026
83b5ff4
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 27, 2026
d4fec7c
Trigger Build
shajoezhu Sep 27, 2026
73d7397
Merge branch '1095_intermediate_nesting' of github.com:pharmaverse/rt…
shajoezhu Sep 27, 2026
39276dd
Trigger Build
shajoezhu Sep 27, 2026
165ce96
update
shajoezhu Sep 27, 2026
656ffd9
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 27, 2026
3ae3ff8
try again styling
shajoezhu Sep 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Collate:
'argument_conventions.R'
'as_html.R'
'utils.R'
'nesting_impl.R'
'colby_constructors.R'
'compare_rtables.R'
'format_rcell.R'
Expand Down
8 changes: 8 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ export(export_as_txt)
export(facet_colcount)
export(find_degen_struct)
export(format_rcell)
export(get_anchor_dfs)
export(get_formatted_cells)
export(get_full_lyt_df)
export(get_kid_types)
export(get_layout_dfs)
export(get_row_anchor_df)
export(get_row_anchor_list)
export(has_force_pag)
export(head)
export(header_section_div)
Expand Down Expand Up @@ -270,6 +276,8 @@ exportMethods(coltree)
exportMethods(content_table)
exportMethods(dim)
exportMethods(facet_colcount)
exportMethods(get_full_lyt_df)
exportMethods(get_kid_types)
exportMethods(has_force_pag)
exportMethods(head)
exportMethods(horizontal_sep)
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
* Added vignette: Guided Tour (Advanced) - (stub) `TableTree` Objects - (stub) Accessing Table Values @gmbecker
* Added vignette: Guided Tour (Advanced) - (stub) `TableTree` Objects - (stub) Custom Scoring Functions For Sorting @gmbecker
* Added vignette: Guided Tour (Advanced) - (stub) `TableTree` Objects - (stub) Custom Pruning Functions @gmbecker

* Added `at_sibling` parameter to `split_rows_by*` and `analyze` functions, enabling placement of a new layout directive as a direct sibling of a previously declared split or analysis @gmbecker
* Added `get_anchor_list()` function for inspecting the available sibling anchors in an existing layout @gmbecker
* `label_pos` now accepts `"default"` as a value, which resolves to `"visible"` when `at_sibling` is non-`NULL` and `"hidden"` otherwise @gmbecker

### Bug Fixes
* `indent_mod<-` `RowsVerticalSection` method now correctly recycles length 1 values @gmbecker
* Fixed `uniqify_child_names` emitting messages ending in a literal `FALSE` due to passing `call. = FALSE` to `message()`, which does not accept that argument @gmbecker
* content functions now receive correct `.ref_group` value instead of a data.frame with zero rows, when requested. #1117 @gmbecker
* Fix in the now exported `RefFootnote` in check for disallowed values in `symbol` argument

Expand Down
39 changes: 32 additions & 7 deletions R/00tabletrees.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ check_ok_label <- function(lbl, multi_ok = FALSE) {
}

valid_lbl_pos <- c("default", "visible", "hidden", "topleft")
.labelkids_helper <- function(charval) {
.labelkids_helper <- function(charval, na_ok = TRUE) {
ret <- switch(charval,
"default" = NA,
"default" = if (na_ok) NA else FALSE,
"visible" = TRUE,
"hidden" = FALSE,
"topleft" = FALSE,
Expand Down Expand Up @@ -466,7 +466,7 @@ MultiVarSplit <- function(vars,
colcount_format = NULL) {
check_ok_label(split_label)
## no topleft allowed
label_pos <- match.arg(label_pos, label_pos_values[-3])
label_pos <- match.arg(label_pos, label_pos_values[-4])
Comment thread
shajoezhu marked this conversation as resolved.
child_labels <- match.arg(child_labels)
if (length(vars) == 1 && grepl(":", vars)) {
vars <- strsplit(vars, ":")[[1]]
Expand Down Expand Up @@ -1656,8 +1656,7 @@ uniqify_child_names <- function(kidlst) {
paste(val_to_fix, " -> {", paste(c(val_to_fix, newnms), collapse = ", "), "}]\n"),
" To control table names use split_rows_by*(, parent_name =.) or ",
" analyze(., table_names = .) when analyzing a single variable, or ",
"analyze(., parent_name = .) when analyzing multiple variables in a single call.",
call. = FALSE
"analyze(., parent_name = .) when analyzing multiple variables in a single call."
)
names(kidlst)[inds] <- newnms
}
Expand Down Expand Up @@ -1914,6 +1913,10 @@ TableTree <- function(kids = list(),
## a pre-existing TableTree/ElementaryTable.
## This is used for add_existing_table in colby_constructors.R

split_or_splitvectree <- function(object) {
Comment thread
shajoezhu marked this conversation as resolved.
is(object, "Split") || is(object, "SplitVectorTree")
}

setClass("SplitVector",
contains = "list",
validity = function(object) {
Expand All @@ -1922,8 +1925,9 @@ setClass("SplitVector",
} else {
lst <- NULL
}
all(sapply(head(object, -1), is, "Split")) &&
(is.null(lst) || is(lst, "Split") || is(lst, "VTableNodeInfo"))
## only last element can be a splitvectree, others must be splits
all(sapply(head(object, -1), function(x) is(x, "Split"))) &&
(is.null(lst) || split_or_splitvectree(lst) || is(lst, "VTableNodeInfo"))
}
)

Expand All @@ -1936,7 +1940,28 @@ SplitVector <- function(x = NULL,
new("SplitVector", lst)
}

setClass("SplitVectorTree",
Comment thread
gmbecker marked this conversation as resolved.
contains = "list",
validity = function(object) {
all(vapply(object, function(x) is(x, "SplitVector") || is(x, "SplitVectorTree"), TRUE))
}
)

SplitVectorTree <- function(x = NULL,
...,
lst = list(...)) {
if (is.null(x)) {
xlst <- NULL
} else {
xlst <- list(x)
}
new("SplitVectorTree", c(xlst, lst))
}

avar_noneorlast <- function(vec) {
if (is(vec, "SplitVectorTree")) {
return(all(sapply(vec, avar_noneorlast)))
}
if (!is(vec, "SplitVector")) {
return(FALSE)
}
Expand Down
7 changes: 6 additions & 1 deletion R/argument_conventions.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ gen_args <- function(df, alt_counts_df, spl, pos, tt, tr, verbose, colwidths, ob
#' to the *split* or *group of sibling analyses*, for `split_rows_by*` and
#' `analyze*` when analyzing more than one variable, respectively. Ignored when
#' analyzing a single variable.
#' @param at_sibling (`character(1)` or `NULL`)\cr If non-null, a preceding
Comment thread
munoztd0 marked this conversation as resolved.
#' split or analyze to anchor this instruction to as a direct sibling. Cannot
#' select an instruction that is downstream of a point where a previously used
#' anchor (See Nesting Anchor Resolution for details).
#'
#' @inherit gen_args return
#'
Expand All @@ -165,7 +169,8 @@ lyt_args <- function(lyt, var, vars, label, labels_var, varlabels, varnames, spl
var_labels, cvar,
table_names, topleft, align, page_by, page_prefix,
format_na_str, section_div, na_str, show_colcounts,
colcount_format, parent_name, formats_var, na_strs_var) {
colcount_format, parent_name, formats_var, na_strs_var,
at_sibling) {
NULL
}

Expand Down
Loading
Loading