Building on the foundation of the previous {gt} lesson — which focused on table structure and manipulation—I learned how to use the {gt}
package to polish, style, and customize tables, enhancing the quality and efficiency of data reports.
Key Skills Gained:
- Applying Pre-Defined Themes (
opt_stylize
)
- Learned to apply pre-defined styles and color themes to tables using the
opt_stylize()
function. Explored different style numbers and color choices to enhance visual appeal.
- Formatting Table Values (
data_color
)
- Used the
data_color()
function to highlight key values in specific columns, making large datasets more interpretable.
- Conditional Formatting (
tab_style
)
- Mastered conditional formatting by applying styles to table cells when they meet specific conditions or thresholds.
- Enhancing Table Text (Fonts & Colors)
- Customized table titles, subtitles, and other text elements with different fonts and colors using
gt::tab_style()
.
- Adding Borders (
tab_style
&cell_borders
)
- Learned to draw borders within tables to highlight specific sections, adjusting line color and thickness for better readability.
For a step-by-step guide with practical examples, visit this site.