Skip to content

Commit

Permalink
group indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Oct 24, 2024
1 parent 4224834 commit 1afea0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions R/group_bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ group_bootstrap_col <- function(x, j, ihead, ...) {
group_bootstrap_row <- function(x, i, j, indent = 1, ...) {
label <- names(i)

# reverse order is important
i <- rev(sort(i))

# # i = list("a" = 2, "b" = 3, "c" = 4) should be displayed consecutively
# i <- i - (rev(seq_along(i)) - 1)

out <- x@table_string

for (g in seq_along(i)) {
Expand Down
4 changes: 3 additions & 1 deletion R/group_tt.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ group_tt <- function(x, i = NULL, j = NULL, indent = 1, ...) {
}
x@group_tt_i <- TRUE
if (isTRUE(indent > 0)) {
idx_indent <- setdiff(seq_len(nrow(x) + length(i)), i)
idx_indent <- setdiff(
seq_len(nrow(x) + length(i)),
i + seq_along(i) - 1)
x <- style_tt(x, i = idx_indent, j = 1, indent = indent)
}
}
Expand Down

0 comments on commit 1afea0e

Please sign in to comment.