TidyX 89: Constructing Tables for Research Publication in R

This week, Ellis Hughes and I delve into our mailbag to answer a question posed to us inquiring how we would go about creating tables for research publication in R. Most of the time it seems that people will get their model outputs and transpose them into Excel to build a table. But, in R you can go directly from the model output straight to a nice table that meets that journal’s requirements.

In this episode, we build a regression model and use {broom} to tidy the model outputs into a clean data frame. When then take that output and walk through different ways of using {gt} to customize your table for publication. We wrap up by covering how to build a plot of the interquartile range and annotate that plot to provide more context using {ggplot2}.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.