I have a few tables (10-15) that are several million rows long. I'd like to expose them via the DT feature in RShiny with the ability to filter in real-time. However, because it can take a long time to filter a table that is sufficiently large, I'd like to use my own function that can be applied on the filters to retrieve the results (rather than having datatable process the same).
1) Using a custom filter function
As a simple example, if the data was coming from a sql table, t as follows:
a b c
1 2 3
4 5 6
1 2 3
And if I had to find all values of a == 1, I can either use the DataTable filter or instead send a query back - eg., select * from t where a==1. Similarly, select * from t where a==1, b==2, ... etc. The latter method (select from ...) is what I'd like to use. I am using an HPC Timeseries database that could process these queries much faster than using the in-built functionality.
2) I'd also like to be able to interact with the page number so that I retrieve only those rows that are required for the current display. Taking the above table, t as an example, if the user was on page 1, I'd only retrieve the first x rows (eg., 10 rows is Show 10 Entries were selected) and when the user clicks on Page 2, I'd retrieve the next set of 10 rows.
There is a slight caveat in that the pagination happens automatically, but I'd be able to provide the count of rows such that the pagination can be accurate (eg., based on the user filter criteria the count of the table is x rows, and hence show x/10 pagination buttons)
I am not sure if this can be done - whether via datatable or through any other means. Would be grateful if someone could advise further on this. Thanks, Raj.
Sure, thanks for checking. The global search does work. Also, I don't see any of the filter values being passed on to the script from thd browser. Eg., column[0] search is blank egereas for global it works fine.
> email to shiny-discuss+unsubscribe@googlegroups.com.