Can DT column filters accept factored input to filter items in a list?
I am creating an R Shiny dashboard that includes a datatable displayed using the DT package. I have column filters displayed at the top of each column, but I want to slightly change the behavior of the filters so that a user can search for one item in a list and find all rows containing that item. For example, I have a column containing a list of food items in each row: “apples, bananas, lettuce”, “pears, apples, pineapple”, “apples, lettuce”. I want the user to be able to select any of the individual items to filter for rows that contain that item in their list. For example, if a user selected “lettuce,” the table would show the first and third examples I just listed.
Datatable multiple class options: nowrap text and no row shading
I am trying to pass different class
options to datatable
in my Shiny app (https://datatables.net/manual/styling/classes).
Rename columns within DT datatable function
It seems the API allows for renaming columns within options > columnDefs
(see here). However, passing name
as an argument doesn’t seem to take. Does DT
not support this or am I doing something wrong? I don’t want to rename the columns upstream; I just want to know if I’m missing something in the documentation.
Create sub headers in DT datatable
I have this dataframe and I want to create a DT datatable which will have sub headers like Gender
and Race
like the image below. How can I do it using DT ?
How to create custom row aggregates in R’s DT library
Goal I would like to produce row aggregates for a table grouped by the rowGroup extension to the DT library. I am able to group the data frame with rowGroup but am unclear how to populate aggregated values in the summary rows. What I’ve tried Consulting examples in the DT documentation, here and here I […]