Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Which is the main function of the datatables library?


Asked by Esther Burgess on Dec 02, 2021 FAQ



Please use Github issues to file bug reports or feature requests, and use StackOverflow to ask questions. The main function in this package is datatable (). It creates an HTML widget to display R data objects with DataTables. Here is a “hello world” example with zero configuration:
Similarly,
DT: An R interface to the DataTables library. The R package DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML pages, and DataTables provides filtering, pagination, sorting, and many other features in the tables.
In fact, DataTables lets you add dynamic features to tables which usually would need a page to reload, including: And more to come... Datatables is for tables what Quicktabs is for tabs.
Moreover,
The main DataTables package includes sorting functions for strings, dates, numeric and currency data, but you may very well wish to order data in some other manner, for example date formats not built in. The sorting functions below provide a wealth of different sorting methods that can be used with DataTables.
Consequently,
To add the ability to sort specific data types, using the plug-in functions below, you simply need to include the plug-in's code in the Javascript available for your page, after you load the DataTables library, but before you initialise the DataTable. Then using the sType parameter for that column, set it to the value needed for the plug-in.