Better Research Productivity and Reproducibility Through Table 1 Automation
This article is part of a series to review the inner workings of table1.cc, the website designed to help you handle the Table 1 generation process with more productivity and confidence. Here, we will briefly review the history of Table 1 automation and discuss the considerations when applying it. We will then generate step-by-step a ‘Table 1’ using the table1.cc website and publicly available data. Finally, we will compare its characteristics in terms of ease and speed with alternative approaches using R/Python packages thus highlighting its potential utility in streamlining the analytic process.
Ultimately, in the following articles of the series, we will discuss the inner workings of the table1.cc web application during this process.
So let’s get started!
A brief history of Table 1 automation
On February 8, 2014 Kazuki Yoshida released tableone version 0.1.0. Tableone is an R package focused on Command Line Interface (CLI — a text-based display mode in which the user enters commands and data) users of the R programming language based on Kazuki's Github Page. This R package has been highly influential, spawning a series of complimentary packages for the R programming language that can be accessed on the above mentioned website.
On May 17, 2017 that development culminated in the release of a homonymous Python module with similar functionality by Tom J Pollard, Alistair E W Johnson, Jesse D Raffa, Roger G Mark thus enabling automated Table 1 creation on the two main statistical programming universes: Python/Pandas and R.
It is notable that the original inspiration for the command line approaches came from a pioneering module Deducer https://crantastic.org/packages/Deducer. Deducer, first released in 2009 by Ian Fellows, provided a Java-based graphical user interface aimed to make R increasingly accessible to the general scientific community.
|Deducer||circa 2009||R (programming language)||Graphical (Java)||R based|
|tableone (R)||February 8, 2014||R (programming language)||Command line based (R)||R based|
|tableone (Python)||May 17, 2017||Python||Command line based (R)||Python based|
|table1.cc||December 22, 2019||Python||Graphical (web based)||Graphical (web based)|
The utility of automation
“To create the Table 1 sometimes it can be very time-consuming. Imagine if we have 10 variables (e.g. age, gender.. etc) for 3 groups, and for each variable we compute mean (standard deviation) and a number of participants (proportion); in the end, we have to fill 60 numbers in the table. Moreover, we usually export the table from R to Microsoft Word, and we can be prone to making mistakes if we’re copy/pasting.”
—Klodian Dhana (creator of datascienceplus.com)
This quote excellently sums up the important reasons for automation and the datascienceplus website does provide excellent resources to enable automated Table 1 generation via the use of R.
Limits of command line approaches
While the datascienceplus.com website provides great resources for many important data science concepts, the following comments highlight the complicated nature of getting Table 1 automation to just work:
Please keep in mind that this is focused to data scientists rather than a general scientific audience, so more accessible interfaces are needed.
The resulting table is functional, as seen below.
How table1.cc is different
Table1.cc simplifies and streamlines all steps of the process by omitting the need for complex syntax. Creating an automated Table 1 using table1.cc is easy using the following procedure:
Download the sample data set (courtesy of Klodian Dhana, datascienceplus.com)
Copy the data set and paste contents (Figure 4)
- Next, you will advance to the following section and see a green notification “Table parsed successfully!” (Figure 5). On this page, tick all checkboxes, select the variable type as shown (green box)
- You can now select the grouping variable. In the field “Select Grouping Variable” select “gender”. Then click on “Make Table 1” (Figure 5b, red arrow)
- After you clicked on this button, you will see the resulting table, already formatted, almost instantly. You may modify your options to perfect its appearance for your individual requirements. For instance, you may elect to calculate the appropriate p-Values and decide to omit the gender variable, since it is also the grouping variable. (Figure 5c)
- You have successfully generated a Table 1 from scratch. Rather than the tedious manual process relying on repetitive copy and paste, your Table 1 is generated accurately and fast. Depending on you speed of mouse movement, you can complete all steps within less than 60 seconds.
Do what you can do best, automate the rest!
—Motto of table1.cc
Software utilities to automate Table 1 generation have advanced dramatically and now allow for reliable and intuitive interaction using platforms such was table1.cc.
These new technologies allow to save time and effort and increased focus on your underlying research interests.
In the following upcoming article of the series will focus on the inner workings of the table1.cc web application and the transformations along the way using the same example data set.