table1.cc Blog

Reproducible and Efficient Creation of ‘Table 1’ Summary Tables for Research Papers

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.


Solution Initial Release Platform Input Output
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)
Development of Table 1 automation solutions over time.

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:

Figure 1. An example of a data scientist with difficulties (source: datascienceplus.com website)

Figure 1. An example of a data scientist with difficulties (source: datascienceplus.com website)

Figure 2. Another examples of complex syntax being a barrier to simple automation (source: datascienceplus.com)

Figure 2. Another examples of complex syntax being a barrier to simple automation (source: datascienceplus.com)

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.

Figure 3. The resulting Table using the traditional automation methods as discussed on datascienceplus.com (source: datascienceplus.com)

Figure 3. The resulting Table using the traditional automation methods as discussed on datascienceplus.com (source: datascienceplus.com)

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:

  1. Download the sample data set (courtesy of Klodian Dhana, datascienceplus.com)

  2. Copy the data set and paste contents (Figure 4)

Figure 4. The table1.cc landing page. Simply paste clipboard into the text box (red), then click on ‘I pasted the spreadsheet data’ (green arrow)

Figure 4. The table1.cc landing page. Simply paste clipboard into the text box (red), then click on ‘I pasted the spreadsheet data’ (green arrow)

  1. 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)
Figure 5a. The table1.cc website after pasting and submitting the simulated data set. Select variables of interest in the green box. You can stratify your table by selecting a grouping variable (purple arrow)

Figure 5a. The table1.cc website after pasting and submitting the simulated data set. Select variables of interest in the green box. You can stratify your table by selecting a grouping variable (purple arrow)

  1. 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)
Figure 5b. Table1.cc allows to easily switch you grouping variable (red box). Confirm by clicking the button labeled ‘Make Table 1!’ (red arrow)

Figure 5b. Table1.cc allows to easily switch you grouping variable (red box). Confirm by clicking the button labeled ‘Make Table 1!’ (red arrow)

  1. 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)
Figure 5c. You can easily edit the appearance of the table by unchecking ‘gender’, checking ‘calculate p-Values’ (purple boxes). Confirm your changes by clicking on ‘Make Table 1’ once again (green arrow)

Figure 5c. You can easily edit the appearance of the table by unchecking ‘gender’, checking ‘calculate p-Values’ (purple boxes). Confirm your changes by clicking on ‘Make Table 1’ once again (green arrow)

  1. 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.
Figure 6. The final Table 1, generated automatically from the sample data set

Figure 6. The final Table 1, generated automatically from the sample data set

Bottom line

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.

Table1.cc is free of charge for researchers if you are curious. Give it a try here and follow us on Twitter @table1cc.