www.eamoncaddigan.net

Content and configuration for https://www.eamoncaddigan.net
git clone https://git.eamoncaddigan.net/www.eamoncaddigan.net.git
Log | Files | Refs | Submodules | README

commit 308bc6e51665b6f9a1d40e6658c157c33394c9fb
parent aff9d116b87d748257e628fc6a4966167331cbe0
Author: Eamon Caddigan <eamon.caddigan@gmail.com>
Date:   Sat, 13 Jan 2024 15:14:29 -0800

Post listing R table layout packages

Diffstat:
Acontent/posts/r-table-packages/index.md | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+), 0 deletions(-)

diff --git a/content/posts/r-table-packages/index.md b/content/posts/r-table-packages/index.md @@ -0,0 +1,69 @@ +--- +title: "R packages for table layout" +date: 2024-01-13T14:53:47-08:00 +draft: false +categories: +- Data Science +tags: +- R +--- + +The R package ecosystem has several packages[^list] that were created to +help with the design and layout of tables in documents. + +<!--more--> + +- **condformat** ([Code forge](https://github.com/zeehio/condformat)) +- **DT** ([Code forge](https://github.com/rstudio/DT), [Website](https://rstudio.github.io/DT/)) +- **flextable** ([Code forge](https://github.com/davidgohel/flextable), [Website](https://davidgohel.github.io/flextable/)) + - **ftextra** ([Code forge](https://github.com/atusy/ftExtra), [Website](https://ftextra.atusy.net/)) +- **formattable** ([Code forge](https://github.com/renkun-ken/formattable), [Website](https://renkun-ken.github.io/formattable/)) +- **gt** ([Code forge](https://github.com/rstudio/gt/), [Website](https://gt.rstudio.com/)) + - **gtsummary** ([Code forge](https://github.com/ddsjoberg/gtsummary), [Website](https://www.danieldsjoberg.com/gtsummary/)) + - **gtExtras** ([Code forge](https://github.com/jthomasmock/gtExtras), [Website](https://jthomasmock.github.io/gtExtras/)) + - **pointblank** ([Code forge](https://github.com/rich-iannone/pointblank), [Website](https://rich-iannone.github.io/pointblank/)) + - **tfrmt** ([Code forge](https://github.com/GSK-Biostatistics/tfrmt), [Website](https://gsk-biostatistics.github.io/tfrmt/)) + - **gto** ([Code forge](https://github.com/GSK-Biostatistics/gto)) +- **huxtable** ([Code forge](https://github.com/hughjonesd/huxtable), [Website](https://hughjonesd.github.io/huxtable/)) +- **knitr** ([Code forge](https://github.com/yihui/knitr), [Website](https://yihui.org/knitr/)) + - **kableExtra** ([Code forge](https://github.com/haozhu233/kableExtra), [Website](https://haozhu233.github.io/kableExtra/)) +- **pander** ([Code forge](https://github.com/Rapporter/pander), [Website](http://rapporter.github.io/pander/)) +- **pixiedust** ([Code forge](https://github.com/nutterb/pixiedust)) +- **reactable** ([Code forge](https://github.com/glin/reactable), [Website](https://glin.github.io/reactable/)) +- **stargazer** ([CRAN](https://CRAN.R-project.org/package=stargazer)) +- **tangram** ([Code forge](https://github.com/spgarbet/tangram)) +- **xtable** ([CRAN](https://CRAN.R-project.org/package=xtable), [Website](http://xtable.r-forge.r-project.org/)) +- **ztable** ([Code forge](https://github.com/cardiomoon/ztable)) + +This 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 +removed[^removed], which is why I'm posting this here. + +Lately I've been programmatically formatting tables for Excel[^xl][^paper] +using [the openxlsx +package's](https://cran.r-project.org/web/packages/openxlsx/) interface +directly, but this is rather low-level. After digging around a bit, I plan +to look into +[tablaxlsx](https://cran.r-project.org/web/packages/tablaxlsx/index.html), +huxtable, and condformat to see how these might suit my needs. + +[^list]: This is almost certainly incomplete, and I would be happy to add + anything that's either under active development or mature and stable. + +[^removed]: Partially removed with [this + commit](https://github.com/rstudio/gt/commit/c01aad5c5734e8a0767328471342a1170554d1ec), + and mostly wiped away with [this + one](https://github.com/rstudio/gt/commit/4ef570e855dcf81532a78a38869f676a7a82b008). + To be clear, this sentiment was strictly "I'm disappointed because I + found this useful and it's gone", and not, like, "I'm disappointed _in_ + Posit for removing it". + +[^xl]: 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. + +[^paper]: 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