23  Other Tables

Let’s finish this section about tables by presenting briefly a few more R packages to create tables in R : rhandsontable, gt and DT .

Note : there are much more awesome packages available! Here are just a few useful examples, among many others, also worth exploring.

24 rhandsontable

As per today (beginning of 2026), rhandsontable is probably the best table with write back capabilities we can use when we create a Shiny app.

The package is particularly useful when building applications that require users to view, edit, or input tabular data directly within an R environment or a Shiny app, offering an user-friendly interface for data entry.

It then allows to capture dynamically some user’s inputs, for example inside a Shiny app, and use those inputs to perform some new calculations, dynamically, inside the same app.

The rhandsontable package is a R interface to the Handsontable.js JavaScript library, which provides a minimalist, Excel-like data grid editor.

We will use this table during the chapters related to Shiny.

Key Features and Usage

  • Data Entry and Manipulation:

    • Users can edit data directly within the grid in a web browser.

    • The package exposes the table as a Shiny input, allowing the modified data to be captured back into the R environment for further analysis using the hot_to_r() function.

  • Data Type Support: It automatically maps R data types to appropriate Handsontable formats. For example:

    • Logical values appear as checkboxes.

    • Date values use a date picker (pikaday.js library).

    • Factors are displayed as dropdown menus.

  • Customization: The package offers functions like hot_col() to customize specific columns, such as allowing or disallowing new levels for factors. 

More info about rhandsontable on :

25 gt great table

The gt package is a powerful, user-friendly R tool for creating publication-ready, highly customizable tables using a “Grammar of Tables” approach.

It enables easy formatting (currency, percentages), styling (headers, footers, spanners), and integration into quarto or Shiny apps. 

Key Features and Capabilities:

  • Structure: It allows precise control over table components like headers, footers, body, and labels.

  • Formatting: Includes functions to format cell values (fmt_currency, fmt_percent) and align columns.

  • Customization: Supports detailed styling with tab_style and cell_text for enhanced aesthetics.

  • Compatibility: Works seamlessly within the tidyverse ecosystem.

  • Functionality: Enables the creation of complex, multi-layered tables, including adding plots or images

The package is developed by Posit (formerly RStudio) and is designed to create elegant tables for reports and data analysis. 

More info about the gt table on :

26 DT

The DT package is an R interface to the powerful JavaScript library DataTables, designed to create interactive and feature-rich tables within the R environment. It allows R data objects (like data frames or matrices) to be displayed as HTML tables.

Key Features

  • Filtering and Searching: you can filter data and search within the table contents using built-in search bars.

  • Pagination: Large datasets are automatically paginated, allowing users to control the number of entries displayed per page.

  • Sorting: Columns can be interactively sorted by clicking on the column headers.

  • Styling and Theming: Tables can be customized with various CSS classes and styles (e.g., row striping, cell borders, Bootstrap style).

  • Data Export: The package enables adding buttons for users to download the source data in various formats.

  • Cell Editing: Users can enable cell editing, allowing direct modification of data values within the table via double-clicking.

One last note : distinction from the data.table package

The DT package should not be confused with the data.table package, which is another popular R package that provides a high-performance, enhanced version of R’s standard data.frame for fast data manipulation and aggregation, particularly for large datasets.

The DT package focuses on displaying data interactively in a web context, while data.table focuses on processing and analyzing data efficiently in the backend

More info about the DT table on : https://rstudio.github.io/DT/