Skip to content

Commit

Permalink
bugfix: group_tt(i=vec) can be factor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Dec 27, 2024
1 parent 665592f commit 9e3e75a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: tinytable
Type: Package
Title: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', 'PDF', and 'Typst' Formats
Description: Create highly customized tables with this simple and dependency-free package. Data frames can be converted to 'HTML', 'LaTeX', 'Markdown', 'Word', 'PNG', 'PDF', or 'Typst' tables. The user interface is minimalist and easy to learn. The syntax is concise. 'HTML' tables can be customized using the flexible 'Bootstrap' framework, and 'LaTeX' code with the 'tabularray' package.
Version: 0.6.1.4
Version: 0.6.1.5
Imports:
methods
Depends:
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Breaking change:
Bugs:

* `save_tt("file.pdf")` works with colors. Thanks to @olivedv for the report and solution #395.
* `group_tt(i=vec)`: `vec` can be a factor vector

New:

Expand Down
1 change: 1 addition & 0 deletions R/group_tt.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ group_tt <- function(x, i = NULL, j = NULL, indent = 1, ...) {
}

sanitize_group_vec2list <- function(vec) {
if (is.factor(vec)) vec <- as.character(vec)
rle_result <- rle(vec)
idx <- cumsum(c(1, utils::head(rle_result$lengths, -1)))
idx <- as.list(idx)
Expand Down

0 comments on commit 9e3e75a

Please sign in to comment.