Basic gt
Styling Reference
Authors: Abigail Drumm
Abstract: A non-comprehensive reference for basic gt
styling using tab_style
and tab_options
.
Full Description: When I first started using gt
I kept wishing I had a picture of a table that identified all the borders from tab_options. They all make sense to me now, but initially I was a bit overwhelmed. When I saw the table contest I was like, “oh hey, maybe I should do that for this.” Then it morphed into more than just borders, covering the basics of tab_style
and tab_options
, within reason.
The version of the border table in my head had the names placed in and around the table with arrows pointing at the relevant border. I wasn’t about to be able to do that in R, and instead I coordinated placement and color. I took (significant) advantage of the html
function provided with gt
to make that happen. Almost all of the dataframes used are built manually. For the two tab_option
border tables, they are almost entirely blank. The one exception is for the tab_options
options table, which was a copy/paste from the documentation into a csv.
Also, I did get a bit obsessed with borders while working on this submission.
Table Type: static-HTML
Submission Type: Other
Table: Basic gt Styling Reference
Code: GitHub - a-drumm/table-contest-2022
Cloud project:
Languages: Built with R: true. Built with Python: false.
Industries: .
Other packages: gt