Not to be confused with a Game of Thrones
gtpackage - a (g)rammar of (t)ables
gt is an R package for generating formatted tables from dataframes in R with a Grammar of Tables.
If you want to go deeper than this basic guide, check out the
gt site, which has lots of examples!
Per the package website,
gt has the following component parts:
The parts (roughly from top to bottom) are:
- the Table Header (optional; with a title and possibly a subtitle)
- the Stub and the Stub Head (optional; contains row labels, optionally within row groups having row group labels and possibly summary labels when a summary is present)
- the Column Labels (contains column labels, optionally under spanner column labels)
- the Table Body (contains columns and rows of cells)
- the Table Footer (optional; possibly with footnotes and source notes)
As you can see it is fleshing out the idea of formatting or adding various parts of the table in a robust way.
I’ve gone through collecting the data and have put into a non-tidy wide format for Salary Rank, playoff week and appearances, Total appearances, and finally salary from 2014-2019.