Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2018-2025
YEAR: 2018-2026
COPYRIGHT HOLDER: Posit Software, PBC
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2018-2025 Posit Software, PBC
Copyright (c) 2018-2026 Posit Software, PBC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion R/as_data_frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
6 changes: 3 additions & 3 deletions R/build_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down Expand Up @@ -98,10 +98,10 @@ build_data <- function(data, context) {
# for vec_*() functions
# only build the body correctly.
build_data_body <- function(data, context) {

data <- dt_body_build(data = data)
data <- render_formats(data = data, skip_compat_check = TRUE, context = context)
data <- migrate_unformatted_to_output(data = data, context = context)

data
}
2 changes: 1 addition & 1 deletion R/cols_add.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_align.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_align_decimal.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_hide.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_label.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_move.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_units.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/cols_width.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/compile_scss.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/data_color.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt__.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_body.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_boxhead.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_cols_merge.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_footnotes.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_formats.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_groups_rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_has_built.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_heading.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_locale.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_row_groups.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_source_notes.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_spanners.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
20 changes: 10 additions & 10 deletions R/dt_stub_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down Expand Up @@ -68,38 +68,38 @@ dt_stub_df_init <- function(

# For multiple columns, we need to handle them as a hierarchy
if (length(rowname_col) > 1) {

# Set all columns as stub columns in the boxhead
for (col in rowname_col) {
data <- dt_boxhead_set_stub(data = data, var = col)
}

# Reorder the boxhead to match the order specified in rowname_col
# This ensures stub columns appear in the order the user specified
dt_boxhead <- dt_boxhead_get(data = data)

# Split boxhead into stub and non-stub rows
stub_rows <- dt_boxhead[dt_boxhead$var %in% rowname_col, ]
non_stub_rows <- dt_boxhead[!dt_boxhead$var %in% rowname_col, ]

# Reorder stub rows to match rowname_col order
stub_rows <- stub_rows[match(rowname_col, stub_rows$var), ]

# Combine: stub rows first (in specified order), then non-stub rows
dt_boxhead <- rbind(stub_rows, non_stub_rows)
rownames(dt_boxhead) <- NULL

# Update the boxhead
data <- dt_boxhead_set(data = data, boxh = dt_boxhead)

# Use the rightmost column as the primary row ID
rightmost_col <- rowname_col[length(rowname_col)]
rownames <- data_tbl[[rightmost_col]]
row_id <- create_unique_id_vals(rownames, simplify = process_md)

# Place the `row_id` values into `stub_df$row_id`
stub_df[["row_id"]] <- row_id

} else {
# Original single column logic
data <- dt_boxhead_set_stub(data = data, var = rowname_col)
Expand Down
2 changes: 1 addition & 1 deletion R/dt_stubhead.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_styles.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_substitutions.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_summary_cols.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
2 changes: 1 addition & 1 deletion R/dt_transforms.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This file is part of the 'rstudio/gt' project.
#
# Copyright (c) 2018-2025 gt authors
# Copyright (c) 2018-2026 gt authors
#
# For full copyright and license information, please look at
# https://gt.rstudio.com/LICENSE.html
Expand Down
Loading