Potentially Useful

Writing boring posts is okay

R packages for table layout

(first posted ) in: Data Science tagged: R

The R package ecosystem has several packages1 that were created to help with the design and layout of tables in documents.

This list was mostly cribbed from an earlier version of the gt package’s website. I found it to be a great resource and was disappointed when it was removed2, which is why I’ve posted it here.

Recently I had been programmatically formatting tables for Excel34 using the openxlsx package’s interface directly, but this is rather low-level. After digging around a bit, I just started using huxtable, and this week I developed a small R package that extends it to simplify some repetitive tasks at my job. This may someday mature enough for public release, but I can’t make any promises.

  1. This is almost certainly incomplete, and I would be happy to add anything that’s either under active development or mature and stable. ↩︎

  2. Partially removed with this commit, and mostly wiped away with this one. To be clear, this sentiment was strictly “I’m disappointed because I found this useful and now it’s gone”, and not, like, “I’m disappointed in Posit for removing it”. ↩︎

  3. My career has brought me into contact with a lot more people who want summary results delivered in a spreadsheet than collaborators who prefer a nice reproducible report—as much as I’d rather focus on the latter. Reproducible spreadsheets, that is, spreadsheets that are created by code, seem like the best compromise. ↩︎

  4. See also: Karl W. Broman & Kara H. Woo (2018) Data Organization in Spreadsheets, The American Statistician, 72:1, 2-10, DOI: 10.1080/00031305.2017.1375989 ↩︎