Package: DT2 0.1.2

Andre Leite

DT2: 'DataTables' 2.x for R

A modern R binding for 'DataTables' V2 with modular extension loading, 'Bootstrap 5' styling, 'Shiny' integration (proxy, events, inline inputs), server-side processing helpers, and standalone (non-Shiny) support. Configure 'DataTables' options directly via R lists, a 1:1 mapping to the 'JavaScript' API.

Authors:Andre Leite [aut, cre], Marcos Wasilew [aut], Hugo Vasconcelos [aut], Carlos Amorim [aut], Diogo Bezerra [aut]

DT2_0.1.2.tar.gz
DT2_0.1.2.zip(r-4.7)DT2_0.1.2.zip(r-4.6)DT2_0.1.2.zip(r-4.5)
DT2_0.1.2.tgz(r-4.6-any)DT2_0.1.2.tgz(r-4.5-any)
DT2_0.1.2.tar.gz(r-4.7-any)DT2_0.1.2.tar.gz(r-4.6-any)
DT2_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
DT2/json (API)

# Install 'DT2' in R:
install.packages('DT2', repos = c('https://strategicprojects.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/strategicprojects/dt2/issues

Pkgdown/docs site:https://strategicprojects.github.io

On CRAN:

Conda:

5.94 score 5 stars 324 downloads 41 exports 26 dependencies

Last updated from:1e6566a113. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK140
source / vignettesOK178
linux-release-x86_64OK129
macos-release-arm64OK105
macos-oldrel-arm64OK81
windows-develOK88
windows-releaseOK118
windows-oldrelOK90
wasm-releaseOK149

Exports:dt2dt2_bind_serverdt2_buttonsdt2_check_updatesdt2_col_buttondt2_col_checkboxdt2_col_templatedt2_cols_aligndt2_cols_escapedt2_cols_hidedt2_cols_htmldt2_cols_render_jsdt2_cols_render_orthogonaldt2_cols_widthdt2_drawdt2_extensionsdt2_format_datetimedt2_format_numberdt2_format_number_abbrevdt2_format_time_formatdt2_format_time_relativedt2_languagedt2_length_menudt2_orderdt2_outputdt2_proxydt2_proxy_orderdt2_proxy_pagedt2_proxy_searchdt2_register_rendererdt2_replace_datadt2_search_globaldt2_select_rowsdt2_ssp_handlerdt2_statedt2_themedt2_update_libsdt2_use_buttonsdt2_use_rendererobserve_dt2_eventsrender_dt2

Dependencies:base64encbslibcachemclidigestevaluatefastmapfontawesomefshighrhtmltoolshtmlwidgetsjquerylibjsonliteknitrlifecyclememoisemimeR6rappdirsrlangrmarkdownsasstinytexxfunyaml

Column Formatting and Rendering
Overview | Number Formatting | Abbreviated Numbers | Date/Time Formatting | Relative Time | Custom JS Renderers | HTML Templates | Orthogonal Rendering | Named Renderers (Reuse Across Tables)

Last update: 2026-06-13
Started: 2026-02-26

Getting Started with DT2
Overview | Responsive Tables | Styling | Inline overrides | Theme presets | Reusable themes | CSS class override | Table Layout | Layout positions | Default layout | Rearranging elements | Removing elements | Multiple elements in one position | Search box placeholder | Buttons (Export / Copy / Print) | Quick setup | Using the helper | Buttons + search together | Grouped buttons with dropdown | Separated button groups with spacer | Bottom buttons | Button styling | Pagination styling | Quick reference | Infinite Scrolling (Scroller) | Column Formatting | Abbreviated numbers (k/M/B) | DataTables Options | Saving as HTML | Keeping Libraries Up to Date | Complete Example: Custom Renderers, Flags, and ColumnControl | Next Steps

Last update: 2026-06-13
Started: 2026-02-26

Extensions Guide
How Extensions Work | Listing Available Extensions | Buttons (Export / Copy / Print) | Grouped Buttons with Labels | Select (Row Selection) | Responsive | ColumnControl | FixedHeader | Combining Extensions | Adding New Plugins | Updating Library Versions

Last update: 2026-02-26
Started: 2026-02-26

Shiny Integration
Basic Usage | Reading Table State | Proxy: Server-Side Manipulation | Buttons with Custom Style | Infinite Scrolling (Scroller) | Custom Layout | Pagination Types | Inline Inputs (Checkboxes and Buttons) | Server-Side Processing | Dataset Switcher with bslib | Shared Theme Across Tables | Complete Example: Custom Renderers, Flags, and ColumnControl

Last update: 2026-02-26
Started: 2026-02-26

Translating DataTables.net Config to R
The 1:1 Mapping Principle | Translation Rules | Example: JS to R | Layout — The Complete Guide | Position grid | Available elements | Default layout | Rearranging | Removing elements | Multiple elements in one position | Full-width rows | Buttons in layout | Customized search box | Complete custom layout | Migrating from dom | Using htmlwidgets::JS() for Callbacks | Common Callbacks | Column Renderers | Built-in DataTables Renderers | Custom Render Function | Internationalization (i18n) | Inline language object | CDN language URL | Debugging

Last update: 2026-02-26
Started: 2026-02-26

Readme and manuals

Help Manual

Help pageTopics
Create a DT2 DataTable widgetdt2
Bind a DataTables v2 server-side endpoint to a widget iddt2_bind_server
Configure DataTables Buttons and (optionally) move them to a custom containerdt2_buttons
Check for DataTables library updatesdt2_check_updates
Action button per rowdt2_col_button
Checkbox input per rowdt2_col_checkbox
Simple HTML template per column (replace '{{VAL}}')dt2_col_template
Column align (Bootstrap 5 classes)dt2_cols_align
Escape/unescape columns contentdt2_cols_escape
Hide columnsdt2_cols_hide
Allow raw HTML rendering via 'columns.render'dt2_cols_html
Attach a raw JS render function to columnsdt2_cols_render_js
Orthogonal render (display/sort/filter/type) per columndt2_cols_render_orthogonal
Column widths (CSS)dt2_cols_width
Redraw the table (proxy)dt2_draw
List available DataTables extensionsdt2_extensions
Format date/time columns (DataTables renderer: datetime)dt2_format_datetime
Format numeric columns (DataTables renderer: number)dt2_format_number
Abbreviate large numbers with fixed decimals (k / M / B)dt2_format_number_abbrev
Format a date/time using DataTables' datetime renderer, with localedt2_format_time_format
Relative time using moment.fromNow(), with localedt2_format_time_relative
Language helper (either list or JSON url)dt2_language
Length menu helperdt2_length_menu
Define initial ordering (option 'order')dt2_order
Shiny output for DT2dt2_output
Create a proxy for a DT2 tabledt2_proxy
Order the table (proxy)dt2_proxy_order
Page navigation (proxy)dt2_proxy_page
Global search (proxy)dt2_proxy_search
Register a named JS rendererdt2_register_renderer
Replace all data in the table (proxy)dt2_replace_data
Set global search (option 'search')dt2_search_global
Select rows (proxy; Select extension)dt2_select_rows
Default server-side handler (filter/order/page)dt2_ssp_handler
Access the current state snapshot of a DT2 tabledt2_state
Create a reusable DT2 themedt2_theme
Update DataTables JS/CSS libraries (developer tool)dt2_update_libs
Enable Buttons (extension) and define buttonsdt2_use_buttons
Use a named JS renderer on columnsdt2_use_renderer
Observe DataTables events published by dt2.jsobserve_dt2_events
Shiny render function for DT2render_dt2