|
1 | | -# sumExtras 0.3.1 |
| 1 | +# sumExtras 1.0.0 (2026-02-09) |
| 2 | + |
| 3 | +## Breaking Changes |
| 4 | + |
| 5 | +* Removed `apply_labels_from_dictionary()`. Use `attr(data$var, "label") <- "Label"` directly, or the labelled package for bulk attribute labeling. |
| 6 | + |
| 7 | +## New Features |
| 8 | + |
| 9 | +* `extras()` now bolds significant p-values (`bold_p()`) automatically when p-values are added. |
| 10 | +* New `header` parameter in `extras()` controls the label column header text (default `""`). |
| 11 | +* New `symbol` parameter in `clean_table()` and `extras()` controls the missing value replacement string (default `"---"`). |
| 12 | +* `add_group_colors()` now accepts a vector of colors (one per group) in addition to a single color for all groups. |
| 13 | + |
| 14 | +## Improvements |
| 15 | + |
| 16 | +* `extras()` now handles `tbl_regression` gracefully: `overall` and `pval` are silently ignored (regression tables already have model p-values), and `bold_p()` is applied automatically. No more warnings when using `extras()` with default arguments on regression tables. |
| 17 | +* `extras()` auto-labeling via `options(sumExtras.auto_labels = TRUE)` is now fully tested. |
| 18 | +* Removed startup message. The package now loads silently. |
| 19 | +* Dropped `purrr` from Imports (4 dependencies instead of 5). |
| 20 | +* New vignettes: `vignette("options")` and `vignette("themes")`. |
| 21 | + |
| 22 | +# sumExtras 0.3.1 (2026-01-22) |
2 | 23 |
|
3 | 24 | ## Improvements |
4 | 25 |
|
|
9 | 30 | - `extras(non_stratified_tbl, overall = TRUE)` - Warns (user explicitly requested) |
10 | 31 | - `extras(non_stratified_tbl, pval = TRUE)` - Warns (user explicitly requested) |
11 | 32 |
|
12 | | -# sumExtras 0.3.0 |
| 33 | +# sumExtras 0.3.0 (2026-01-15) |
13 | 34 |
|
14 | 35 | ## New Features |
15 | 36 |
|
|
21 | 42 |
|
22 | 43 | ## Improvements |
23 | 44 |
|
24 | | -* Extended list of zero or `NA` value recognition used by `clean_table`. This fixes the funcion previously not recognizing `0 (0)` for Mean (SD). |
| 45 | +* Extended list of zero or `NA` value recognition used by `clean_table`. This fixes the function previously not recognizing `0 (0)` for Mean (SD). |
25 | 46 |
|
26 | | -# sumExtras 0.2.0 |
| 47 | +# sumExtras 0.2.0 (2026-01-05) |
27 | 48 |
|
28 | 49 | ## Breaking Changes |
29 | 50 |
|
|
34 | 55 | * New `add_group_colors()` function provides a clean, pipeable way to add background colors to group headers |
35 | 56 | - Combines text formatting, gt conversion, and color application in one step |
36 | 57 | - Eliminates need for manual `get_group_rows()` and `as_gt()` calls |
37 | | - - Perfect for creating publication-ready tables quickly |
38 | | - - Reduces typical styling code from 20+ lines to ~11 lines (45% reduction) |
| 58 | + - Reduces typical styling code from 20+ lines to ~11 lines |
39 | 59 |
|
40 | 60 | ## Documentation |
41 | 61 |
|
42 | 62 | * Updated all examples and vignettes to use new function names |
43 | 63 | * Improved README with cleaner side-by-side comparison showcasing the new API |
44 | | -* Added comprehensive `add_group_colors()` section to styling vignette with side-by-side manual vs. convenience pattern comparison |
| 64 | +* Added `add_group_colors()` section to styling vignette with side-by-side manual vs. convenience pattern comparison |
45 | 65 | * Updated all function references across documentation |
46 | 66 |
|
47 | | -# sumExtras 0.1.1 (development version) |
| 67 | +# sumExtras 0.1.1 (2025-11-15) |
48 | 68 |
|
49 | 69 | ## Bug Fixes |
50 | 70 |
|
|
60 | 80 | reducing package dependency footprint |
61 | 81 | * Replaced `purrr::walk2()` with traditional for-loop in `apply_labels_from_dictionary()` |
62 | 82 | for improved code clarity and maintainability |
63 | | -* `add_auto_labels()` now displays a clearer, more user-friendly message when |
64 | | - automatically finding a dictionary in the environment: "Auto-labeling from |
65 | | - 'dictionary' object in your environment (this message will only show once per |
66 | | - session)". The message now only appears once per R session to reduce clutter |
67 | 83 |
|
68 | 84 | ## Documentation |
69 | 85 |
|
70 | 86 | * Added package-level documentation (`sumExtras-package`) with notes about |
71 | 87 | dependency on gtsummary internal structures and minimum version requirements |
72 | | -* Enhanced `add_auto_labels()` documentation with comprehensive explanation of R's |
73 | | - ecosystem label convention, including integration with haven, Hmisc, and ggplot2 4.0+. |
74 | | - New documentation clarifies how labels work across the R ecosystem using standard |
75 | | - `"label"` attributes without special packages or formats |
76 | | -* Added extensive documentation to `apply_labels_from_dictionary()` explaining the |
77 | | - implementation approach using native R attributes and ecosystem compatibility |
78 | | -* Updated README with new "How Labels Work" section explaining how the labeling system |
79 | | - uses R's standard attribute convention, enabling seamless integration with ggplot2, |
80 | | - gt, Hmisc, and other label-aware packages |
| 88 | +* Enhanced `add_auto_labels()` documentation with implementation notes about |
| 89 | + gtsummary internals |
81 | 90 | * Added Fisher test documentation in `extras()` explaining why Monte Carlo |
82 | 91 | simulation is used |
83 | 92 | * Created CITATION file for proper package attribution |
84 | | -* Added comprehensive new vignettes covering key sumExtras workflows: |
85 | | - - `vignette("labeling")` - **Automatic Variable Labeling**: Detailed guide to unified labeling |
86 | | - across gtsummary tables and ggplot2 plots. Covers R's label attribute system, creating and |
87 | | - maintaining data dictionaries, automatic label discovery with `add_auto_labels()`, setting |
88 | | - label attributes with `apply_labels_from_dictionary()`, label priority control via |
89 | | - `sumExtras.preferDictionary` option, and cross-package workflows demonstrating seamless |
90 | | - integration between gtsummary, ggplot2, and gt |
91 | | - - `vignette("styling")` - **Table Styling and Formatting**: Advanced techniques for creating |
92 | | - publication-ready tables. Covers creating visually organized tables with group headers, |
93 | | - styling group headers with text formatting via `group_styling()`, adding background colors |
94 | | - for emphasis with `get_group_rows()`, theme management across gtsummary and gt with |
95 | | - `use_jama_theme()` and `theme_gt_compact()`, and combining techniques for professional |
96 | | - table presentation |
97 | 93 |
|
98 | 94 | ## Testing |
99 | 95 |
|
100 | | -* **Comprehensive labeling test suite added** - 51 new test cases (826+ lines) in |
101 | | - `test-labels.R` providing thorough coverage of the labeling system: |
102 | | - - Dictionary auto-discovery and session-scoped messaging behavior |
103 | | - - Label priority logic testing both default (attributes > dictionary) and |
104 | | - `preferDictionary = TRUE` modes |
105 | | - - Comprehensive error validation with proper error classes for invalid inputs |
106 | | - - Edge case coverage: NA values, empty/single-row data, very long labels |
107 | | - - Integration tests validating all 9 vignette workflow scenarios |
108 | | - - Performance testing with large dictionaries (1000+ entries) and wide data |
109 | | - - Robustness testing with special characters, unicode, and underscores |
110 | 96 | * Added unicode and emoji test to verify label handling of special characters |
111 | 97 | (emoji, Greek letters, symbols) |
112 | 98 | * Updated all regex tests to use base R `grepl()` instead of stringr |
113 | | -* Package now has 245 passing test assertions with 100% success rate |
114 | 99 |
|
115 | 100 | # sumExtras 0.1.0 (2025-11-15) |
116 | 101 |
|
|
127 | 112 |
|
128 | 113 | * Added `use_jama_theme()` function for explicit JAMA compact theme application |
129 | 114 | * Users can now opt-in to the recommended JAMA theme by calling `use_jama_theme()` |
130 | | -* `add_auto_labels()` now supports `tbl_regression` and `tbl_uvregression` objects in addition to `tbl_summary` objects, enabling automatic variable labeling for regression tables from dictionary files (55bc540) |
| 115 | +* `add_auto_labels()` now supports `tbl_regression` and `tbl_uvregression` objects in addition to `tbl_summary` objects (55bc540) |
131 | 116 | * `add_auto_labels()` now automatically searches the calling environment for a |
132 | 117 | `dictionary` object when no dictionary is explicitly provided |
133 | 118 | * `add_auto_labels()` can now read label attributes directly from data as a |
134 | | - fallback when no dictionary is found, enabling seamless integration with |
135 | | - {haven}, {labelled}, and other packages that set label attributes |
136 | | -* `add_auto_labels()` implements a smart label priority hierarchy: Manual labels |
137 | | - (set via `label = list()` in `tbl_summary()`) always take precedence, followed |
138 | | - by dictionary/attribute labels (based on `sumExtras.preferDictionary` option), |
139 | | - then default variable names |
| 119 | + fallback when no dictionary is found, so it works with {haven}, {labelled}, |
| 120 | + and other packages that set label attributes |
| 121 | +* `add_auto_labels()` uses a fixed label priority: manual labels (from |
| 122 | + `label = list()`) take precedence, then attribute labels, then dictionary |
| 123 | + labels, then variable names |
140 | 124 | * Added `apply_labels_from_dictionary()` function to set label attributes on |
141 | | - data from a dictionary, enabling cross-package workflows with ggplot2 4.0+ |
142 | | - automatic axis labeling, gt, and other label-aware packages |
143 | | -* Added `options(sumExtras.preferDictionary)` to control label priority when |
144 | | - both dictionary and attribute labels are available. Default is `FALSE` |
145 | | - (attributes preferred over dictionary) |
| 125 | + data from a dictionary for use with ggplot2 4.0+, gt, and other |
| 126 | + label-aware packages |
| 127 | +* Label priority is fixed: manual labels > attribute labels > dictionary labels |
146 | 128 | * `group_styling()` gains an `indent_labels` parameter (default `0L`) to control |
147 | 129 | indentation of variable labels under group headers. Set to `4L` to preserve |
148 | 130 | gtsummary's default group indentation behavior |
|
151 | 133 |
|
152 | 134 | ## Minor Improvements and Bug Fixes |
153 | 135 |
|
154 | | -* `add_auto_labels()` now gracefully handles missing dictionaries by falling |
155 | | - back to label attributes instead of erroring, improving robustness in |
156 | | - workflows where dictionary availability varies |
| 136 | +* `add_auto_labels()` now falls back to label attributes when no dictionary |
| 137 | + is found instead of erroring |
157 | 138 | * Fixed missing import of `gtsummary::all_tests()` in `extras()` function |
158 | 139 | * Improved regex pattern in `clean_table()` to avoid false positives (e.g., matching `"..."` or `" "`) |
159 | 140 | * `extras()` now warns when `add_overall()` or `add_p()` fail instead of silently continuing |
160 | 141 | * Fixed `modify_indent()` column parameter in `group_styling()` - column name now properly quoted as "label" to ensure correct indentation when rendering vignettes in pkgdown |
161 | | -* Enhanced `extras()` to warn when called with unsupported table types (tbl_regression, tbl_strata, non-stratified tables) instead of silently skipping features |
| 142 | +* `extras()` now warns when called with unsupported table types (tbl_regression, tbl_strata, non-stratified tables) instead of silently skipping features |
162 | 143 | * Fixed `clean_table()` handling of `tbl_strata` objects by detecting when `var_type` column is missing |
163 | 144 |
|
164 | 145 | ## Performance Improvements |
|
175 | 156 | # sumExtras 0.0.0.9000 (development version) |
176 | 157 |
|
177 | 158 | * Initial development release of sumExtras |
178 | | -* Added `extras()` function for streamlined gtsummary table styling |
| 159 | +* Added `extras()` function for one-call gtsummary table styling |
179 | 160 | * Added `clean_table()` for standardized missing value display |
180 | 161 | * Added `add_auto_labels()` and `create_labels()` for automatic variable labeling |
181 | 162 | * Added `theme_gt_compact()` for JAMA-style gt table themes |
182 | | -* Added `group_styling()` for enhanced group header formatting |
| 163 | +* Added `group_styling()` for group header formatting |
0 commit comments