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.

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. See the package website http://rstudio.github.io/DT for more information.

1888 questions
12
votes
1 answer

DT in Shiny and R: Custom number formatting

I have a shiny-app that displays a datatable using the DT-package. What I want is to be able to format columns in a custom way. For example I want a currency value to be displayed like this: 1,234.50€ instead of the DT-way, which displays it like…
David
  • 9,216
  • 4
  • 45
  • 78
11
votes
2 answers

Buttons: download button with scroller downloads only few rows

I am handling tables with more than 100 000 rows and using DT package (development version 0.1.56) to visualize it in Shiny App. Furthermore I am using DT Extensions as: Buttons, to download the data in different formats. However while Scroller…
Mal_a
  • 3,670
  • 1
  • 27
  • 60
11
votes
1 answer

Update row(s) of a Shiny DataTable while maintaining position

I am creating a Shiny app that displays data.frame information at the top of the screen and specific variable stats at the bottom. The user can navigate the data.frame columns by interacting with a DT::datatable object. When a user clicks on a…
Zelazny7
  • 39,946
  • 18
  • 70
  • 84
11
votes
1 answer

Conditional formatting cell in DataTable in R

I have the following code so far as an example: library(DT) datatable(iris, options = list(pageLength = 5)) %>% formatStyle( 'Sepal.Width', backgroundColor = styleInterval(3, c('gray', 'yellow')) ) I am interested though in highlighting…
dimitris_ps
  • 5,849
  • 3
  • 29
  • 55
10
votes
3 answers

Can you change the R default table length when outputting with the DT package?

In R DT you can define the table control elements with code such as: # only display the table, and nothing else library(DT) datatable(mtcars, options = list(dom = 't')) The t above is a DOM. The DOM element l controls the length changing input…
Display name
  • 4,153
  • 5
  • 27
  • 75
10
votes
2 answers

Fixing a column in Shiny DataTable while Scrolling Right Does not Work

I am just trying to keep the left most column fixed when scrolling right with the ScrollX enabled, and just can't get it to work. Any idea what I need to do different? library(shiny) library(DT) ui <- fluidPage( …
Gopala
  • 10,363
  • 7
  • 45
  • 77
10
votes
1 answer

Checkboxes in DT shiny

I'm trying to make checkboxs into DT table and collect information about checked rows. My code below shinyApp( ui = fluidPage( fluidRow( verbatimTextOutput("value1"), column(12, DT::dataTableOutput('table'), …
jyjek
  • 2,627
  • 11
  • 23
10
votes
1 answer

Adding an image to a datatable in R

I'm trying to add an image to a datatable in R form the DT package. I fount this question: How to embed an image in a cell a table using DT, R and Shiny and it works for the image that's online. But when I tried to add a image that i have locally…
Alejandro Andrade
  • 2,196
  • 21
  • 40
10
votes
1 answer

Shiny renderDataTable table_cell_clicked

I am trying to create a table using Shiny, where the user can click on a row in order to see further information about that row. I thought I understood how to do this (see code attached). However, right now as soon as the user clicks the…
Marissa
  • 103
  • 1
  • 5
10
votes
1 answer

Format color of shiny datatable (DT) according to values in a different dataset

I am trying to format the DT according to the values from the previous table. For example, I want to display if something has increased, decreased or remained the same. I could do this with kable but could not get the next step where I want to…
discipulus
  • 2,665
  • 3
  • 34
  • 51
10
votes
1 answer

Shiny DataTable: Save full data.frame with buttons extension

I am using DataTables with Shiny. With the buttons extension a user can download or print the data in the datatable. But only the visible part of the rows is downloaded/printed. I want to change that behaviour, so that the full data.frame with all…
needRhelp
  • 2,948
  • 2
  • 24
  • 48
10
votes
1 answer

R Shiny: How to add data tables to dynamically created tabs

I am currently trying to create dynamically-created data tables that each have its own tab. The number of tabs is determined by the user. I have used the code from this post as a framework. I am able to create the tabs dynamically, but I can't…
SEHOCKETT
  • 179
  • 1
  • 9
10
votes
2 answers

Shiny conditionalPanel conditions based on NULL values in R?

I am writing a Shiny application that will query a database a few times. The queries may take some time, so I am using actionButton to allow the user to control when they are started. The general flow of the application is: User loads page, pushes…
TARehman
  • 6,659
  • 3
  • 33
  • 60
10
votes
1 answer

resize datatables to fit within R markdown

I am trying to embed datatable in the R Markdown ioslides. However for a table with more than 8 col, it would not be able to fit within one page. Is there in the r chuck to re-size table to fit within ioslide? I have tried to use width in the…
Rick
  • 229
  • 1
  • 3
  • 11
9
votes
2 answers

Highlight word in DT in shiny based on regex

Using DT in shiny, I want to be able to highlight the selected word. Setting searchHighlight = TRUE is close to what I want, but this will also highlight words that include the search. For example, if I am searching for "on" it will also match…
Jaccar
  • 1,720
  • 17
  • 46