Questions tagged [dt]

DT is an R package that provides an interface to the JavaScript library DataTables. Use the data.table tag for questions related to the data.frame extension package data.table.

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

How to conditionally change the background color of cells?

I would like to conditionally change cell color to red (e.g. PARAMCD=="Param1" and AVAL < 0). Is it doable using formatstyle() of DT. I dont want to use custom JS since formatstyle will ...
R007's user avatar
  • 103
0 votes
1 answer
40 views

How to select only a single parent row in R Shiny js datatable

I have the first code chunk in this answer (reproduced below) and I want to extend it so that the user is able to select only a single parent row at a time. There are two things I'm after: the table ...
happyspace's user avatar
0 votes
1 answer
22 views

Allow user to strikethrough cells within table

I'm trying to allow user input to strikethrough certain cells within a table. For example, if we have this simple table displayed in Shiny: The user can select a single cell which would cause the ...
figNewton's user avatar
  • 127
2 votes
1 answer
36 views

DT Child Rows [nested list]

I would like to use child rows in DT R package similar to this example. However, I need to be able to click on a row to show/expand the contents of a nested list column (also shown as data frame). ...
Ahmed El-Gabbas's user avatar
0 votes
1 answer
16 views

Add options to R datable after the datatable is created

I have an R script that gets a dataframe, performs some manipulations and eventually saves the dataframe as datatable for final visualization in my shiny app. Depending on some user inputs, I would ...
Angelo's user avatar
  • 1,628
0 votes
1 answer
17 views

Issue with R dt:datatable top filter

this may be a very easy question, still I'm quite stuck and can't seem to find a similar issue asked here in stackoverflow. I have the following sample dataframe: df2 = data.frame(RTG=c("A+",...
Angelo's user avatar
  • 1,628
0 votes
0 answers
21 views

DT client side rendering is slow

A table (using DT) displays (max.) 10.000 rows (using dom='ltipr'). Loading and filtering (filter='top') data is slow. I need to use client-side rendering. Are there any options available to improve ...
Odrai's user avatar
  • 2,073
1 vote
1 answer
33 views

Is it possible to restrict the values that can be used in an editable datatable in Shiny?

I have an editable datatable in Shiny. In the table there is a column that has numeric values that the user can edit. This works fine and I have found much information on how to restrict which rows/...
reidj's user avatar
  • 332
2 votes
0 answers
61 views

Conflict between DT::datatable and haven_labelled

There seems to be a conflict between DT::datatable and haven_labelled data types. This works fine: library(dplyr) library(DT) library(labelled) testDf <- tibble(a=c("one","two"),...
bcarothers's user avatar
0 votes
1 answer
39 views

How to modify the following shiny code to obtain row indexes selected by checkbox?

I am interested to have a data table as following in my shiny app. After I select the rows using the check boxes, I would like to continue working on the selected data. The problem now is that I don't ...
Wendy's user avatar
  • 3
1 vote
1 answer
28 views

How to create a popover in shiny that appears at tab switch?

I would like to create a popover/tooltip in my Shiny app that appears right away when the users switches to the tab that contains a data table that the popover is attached to. With the shinybs package,...
DanB's user avatar
  • 163
1 vote
1 answer
48 views

Python, Can't Transform Date Array to days

I have this csv file "rfm_data.csv": CustomerID PurchaseDate TransactionAmount ProductInformation 8814 11-04-23 943.31 Product C 2188 11-04-23 ...
JOSE PUEBLA's user avatar
2 votes
2 answers
60 views

DT Display total sums per column in header row

DT does not provide a built-in total sum header row. The next requirements need to be covered by the solution: first header row should display the 'original' column names. the second header row ...
Odrai's user avatar
  • 2,073
0 votes
2 answers
49 views

RenderTable with each row filled by a percentage like a horizontal bar chart

I am trying to achieve something like this: I was wondering if this is something that can be achieved with renderTable and some CSS/HTML, but I wasn't able to come anywhere close to achieving this. ...
user165426's user avatar
-1 votes
0 answers
23 views

Render the class of the column after the column name in DT

I think it's important for users who don't know R to help them check their data formats This is as far as I can get with headerCallback at the moment, but there are two more problems the value ...
toxin's user avatar
  • 3
0 votes
0 answers
26 views

How to show full content in drop down column selection box

when use DT to show a data frame in shiny app. it can't show full content in drop down column selection box, just as the below picture, the last word is truncated in the drop-down selection box. ...
Chengcheng Ma's user avatar
0 votes
1 answer
35 views

R shiny app to display plots and tabular data

I am completely lost on how to build an R Shiny app that displays both graphical and tabular data. The goal is to 1. scrap USGS data, 2. build a plot panel of the flow data, and 3. have a tab with a ...
Koda's user avatar
  • 165
0 votes
0 answers
14 views

Common input for visNetwork and DT in Shiny R

I am trying to figure out how can I like together visNetwork and DT in Shiny R. I want to use a selected node in the visNetwork as an input for selected row in the DT and vise versa. For example, if a ...
mitya's user avatar
  • 1
1 vote
1 answer
45 views

How to prevent the shifting of the headers when first header and first col are fixed in datatable?

I have a datatable with the first header and the first column fixed when scrolling horizontally and vertically. Everything works fine thanks to this answer. But if the first column contains a cell ...
pietrodito's user avatar
  • 1,817
0 votes
1 answer
34 views

DT column filter destroys shiny navbar input elements

I have a shiny app in which a new tab panel with input element gets created by a click of a button. There is also a DT object which shows global information and with which elements can be selected and ...
schistef's user avatar
0 votes
2 answers
52 views

Shiny DT datatable with selectInputs - how to retain selections after switching page?

I have a Shiny app with a DT datatable which includes selectInputs. If I make a selection on page 1, change the page, and come back to page 1, the selection is reset. How can I keep my selections ...
Ben Ernest's user avatar
0 votes
1 answer
78 views

shiny-bound-input class lost in R Shiny with DT and data.table while calling from one mudule to another

I am trying to build a shiny app that uses dynamically created inputs within a data.table with the help of the DT package. In the example below, in module2 server I am getting reactive datatable named ...
Bhuvanesh Harikrishnan's user avatar
1 vote
1 answer
36 views

How to preserve colspan attributes of DT when exporting to xlsx within an RMD file?

I have a sample RMD that includes a DT with a custom container. My issue is that, I'm unable to download the DT into an excel format that preserves the main column headers as they encompass child ...
Jamie's user avatar
  • 1,803
1 vote
1 answer
16 views

Shiny selectInput in DT datatable - keep selectized when data updated

In my Shiny app I have a DT datatable with selectInputs which are updated in response to user input. I am using JavaScript to bind/unbind the selectInputs and to selectize them for styling and search ...
Ben Ernest's user avatar
0 votes
0 answers
31 views

R Shiny DT - Searching a row whose name contains a '&' character doesn't yield any result

In a DT object within a R Shiny app, when looking in the filter of the relevant column for a row whose name contains a character &, its name is found by the filter (selectize) but when selecting ...
Olivier7121's user avatar
1 vote
1 answer
68 views

How to show the rowGroup count in a collapsed DT in R Shiny?

I'm looking at this previous question Collapse rowGroup Shiny and the solution provided. library(shiny) library(DT) ui <- fluidPage(# Application title titlePanel("Collapse/Expand table"...
Angelo's user avatar
  • 1,628
1 vote
1 answer
12 views

Some strings disappear in DT when using filters with searchHighlight option

There is an issue connected with DT filtering when using individual column filters + the searchHighlight option. Steps to reproduce: Use this code to generate a simple DT table with a single ...
Stéphane Laurent's user avatar
0 votes
0 answers
94 views

Insert the pickerInput in the DT of the shiny and can save the options

I'm using shiny to create a datatable for our lab for sharing paper. I'm distributing the app to my colleagues via a free deployment on shinyapps.io. In order to be able to update the content of the ...
toxin's user avatar
  • 3
0 votes
0 answers
36 views

Copy formatted text from datatable in Shiny app

I have a datatable made of four columns and multiple rows. Cells can contain strings with substrings in bold. I'm trying to find a way to copy (clipboard) the datatable and then being able to paste it ...
Trichophyton's user avatar
0 votes
0 answers
39 views

How to add a column of checkboxes to a DT table?

Building on an earlier question that StackOverflow came to the rescue on... I'm building an app that connects to a database and pulls in a bunch of data, then lets the user "drill down" ...
jerH's user avatar
  • 1,083
0 votes
2 answers
22 views

Use R Shiny checkboxGroupInput to select columns for DT::dataTableOutput

I'm pretty novice with Shiny. I'm working on an app that connects to a database and pulls in a bunch of data, then lets the user "drill down" through a series of selectInput's and then ...
jerH's user avatar
  • 1,083
0 votes
1 answer
80 views

In R Shiny, how can I make a table of checkboxes that also has 'select all' checkboxes for individual rows/columns?

Using R Shiny, I want to display a table (e.g. via the "DT" package) with each cell containing a single checkbox. Next to each row and column heading I want to display a 'select all'/'master ...
ddm_ingram's user avatar
0 votes
1 answer
18 views

Remove headerPanel entry from csv downloadable (Rshiny, extensions, buttons)

Considering the following simple Rshiny app, ui <-shinyUI(fluidPage( headerPanel("test"), DT::dataTableOutput("tab"), )) server <- function (input, output) { output$...
Omar Velazquez's user avatar
1 vote
0 answers
39 views

Wrong hour given by the expression "object.dt.hour"

The code is returning the wrong hour at 09/04/2023 11:00:00. It is returning me the hour 10 for some reason. I have a date column in a excel sheet with every hour in 2023 (01/01/2023 01:00:00 till ...
Rodrigo Araujo Mendes's user avatar
0 votes
1 answer
73 views

How to style a tooltip in a Shiny data table?

I have a data table in a Shiny dashboard that includes tooltips for the data in the first column. Unfortunately, I haven't been able to write working CSS code to style the tooltips, e.g. change the ...
DanB's user avatar
  • 163
0 votes
1 answer
19 views

How to get the cell clicked from a dataTable in a dynamic UI?

Consider this example with two dataTables. One of them is generated dynamically but I do not know how to get cell-clicked events from it. library(shiny) library(DT) ui <- fluidPage( textOutput(&...
pietrodito's user avatar
  • 1,817
0 votes
2 answers
32 views

How to toggle a cell and remove it for further calculation within a shiny app

I am creating an app whom the goal is to compute rowmeans and coefficient variation (by rows). Each id got 3 measures. The user must be able to remove one or two values if the cv is too high (8). I ...
VincentP's user avatar
0 votes
1 answer
32 views

How do I render choices for selectInput in DTEdit?

I am working on an RShiny app using the DTedit package to create an editable data table. The goal is to allow users to map columns from two different data frames. However, when using selectInput in ...
big_cactus's user avatar
-1 votes
1 answer
61 views

Hide <dt>when divs have display none

I want when all the divs with class "conteudoGuia" inside <dt> are display: none, the <dt> receive display: none Someone can help and explain me? I tried much alternatives and ...
Bauluccy's user avatar
0 votes
1 answer
83 views

shinyWidgets pickerInput in DT datatable with liveSearch

I would like to insert pickerInputs from shinyWidgets in a DT datatable in a Shiny app. However, the liveSearch option is not working for me when rendered inside a datatable. Also, when I have a ...
Ben Ernest's user avatar
0 votes
1 answer
41 views

Changing background color of selected row in shiny data table not working

I have a shiny app with a data table and I would like to change the default color for selected rows. I found various posts addressing this issue and suggesting to add a style tag tags$style(HTML('...
DanB's user avatar
  • 163
2 votes
2 answers
156 views

DT Datatable with selectInputs resets back to left after selection

I am using selectInputs in a column of a DT datatable in a Shiny app. Thanks to some help here, I am including some JavaScript to selectize the selectInputs to keep the style and search capability of ...
Ben Ernest's user avatar
0 votes
1 answer
41 views

How to plot a graph of selected rows to from a DT data table in a shiny app

In a shiny app I would like to plot a graph from selected rows of a DT data table. There are two problems I am struggling with: I would prefer the graph to be blank until row selection(s) is/are made ...
Peter's user avatar
  • 11.7k
1 vote
2 answers
86 views

How do I make persistent checkboxes with DT::datatable in Shiny?

Using this answer, I made a DT::datatable in Shiny which contain a column of checkboxes, but I'm having an issue where if I check some boxes, go to another page on the table, then return to the ...
saheed's user avatar
  • 340
1 vote
1 answer
40 views

How do I resize the row height of a DT::datatable in Shiny which includes a column of checkboxes?

Using this answer, I've added a column of checkboxes to a datatable in Shiny. I can adjust the row heights with DT::formatStyle() when the checkbox column isn't present, but it doesn't work on a table ...
saheed's user avatar
  • 340
0 votes
1 answer
109 views

R shiny reactable run function only onclick

library(shiny) library(DT) library(reactable) ui <- { fluidPage( fluidRow( div(reactableOutput("atlas_cohort_tbl"),style = "font-size:80%") ) ) } server <-...
sutsabs's user avatar
  • 431
0 votes
1 answer
39 views

How to colour rows by multiple conditions on DT datatable

I've been struggling with this one, and I can't seem to find a solution for it online. I'm creating an html table using the DT package and I would like to colour the rows depending on several ...
milcs40's user avatar
0 votes
1 answer
44 views

shiny, table slicing, textfield

What I need help implementing is: I have a table in shiny, and I would like to slice the table according to the user input. For example the user types 1, 4-6, and then they would see only the first ...
galaxy--'s user avatar
  • 152
0 votes
1 answer
27 views

Return a series of DT::datatables within a list in knitted HTML document

I have a function that returns a series of tables. I want to return them all as a DT::datatable. However, I cannot get R to return these tables when they are in a list. They appear in the RMarkdown ...
missgwolf's user avatar
  • 356
0 votes
0 answers
24 views

Shiny DT show per column mean and SD as hover text over column values per each numeric column

Let us say I something as follows using DT and Shiny. Now, I want to add "hover text" over any cell of any column, and the hover text itself should be column specific, showing "mean / ...
Gopala's user avatar
  • 10.4k

1
2 3 4 5
38