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.

1400 questions
144
votes
14 answers

DataTable: Hide the Show Entries dropdown but keep the Search box

Is it possible to hide the Show Entries dropdown but keep the Search box in DataTable? I want to always display 10 rows with pagination at the bottom along with search box but do not want to display the Show entries dropdown.
FaisalKhan
  • 2,026
  • 3
  • 20
  • 32
55
votes
1 answer

How do I suppress row names when using DT::renderDataTable in R shiny?

As per the explanation in section 2.3 here, I can remove rownames for a datatable by setting rownames = FALSE How do I suppress row names when using DT::renderDataTable in R shiny? The following doesn't work because if you look at the dataTables…
Frikster
  • 2,216
  • 5
  • 27
  • 60
47
votes
2 answers

R Shiny set DataTable column width

I am trying to set the width of columns in a DataTable rendered in Shiny and am not able to implement it using the aoColumnDefs options. Has anyone tried this before ? My table has 1 text followed by 3 numeric columns. The numeric columns need to be…
xbsd
  • 2,298
  • 2
  • 22
  • 34
46
votes
1 answer

Column alignment in DT datatable

In my shiny app I am using datatable function from DT library to construct a table and want to align columns on center. I can use formatStyle('column', textAlign = 'center') but it affects only column body and not the header.
danas.zuokas
  • 4,116
  • 4
  • 25
  • 39
41
votes
4 answers

Remove 'search' option but leave 'search columns' option

I would like to remove 'global search' option from my application, but leave 'column search' option. Any ideas? I've tried different paramethers like searching=FALSE, filtering='none'... None of this works properly. My…
Marta
  • 2,704
  • 2
  • 12
  • 31
21
votes
2 answers

Hide certain columns in a responsive data table using DT package

I am trying to create a responsive data table for my shiny application using DT package. I want to hide certain columns in advance. For example: library("shiny") library("DT") shinyApp( ui = fluidPage(DT::dataTableOutput('tbl')), server =…
skorkmaz
  • 359
  • 1
  • 3
  • 9
19
votes
1 answer

Convert a column of text URLs into active hyperlinks in Shiny

I am creating a user interface for a pathway enrichment program. The results are shown in a table as shown below. Below is a snippet showing that I am using DT::renderDataTable and DT::datatable to output the table in a tab. spia_out() is just a…
Komal Rathi
  • 3,560
  • 11
  • 42
  • 88
18
votes
4 answers

changing font size in R DataTables (DT)

Have been trying to change the font size of all text in the tables generated by DT. However, I could only figure out how to change the size of the records using formatStyle(names(datCalc), fontSize = '12px'). The column headers and buttons have text…
tmesis
  • 307
  • 1
  • 2
  • 8
17
votes
2 answers

Shrink DT::dataTableOutput Size

I have a shiny interface, and I use DT::dataTableOutput and DT::renderDataTable a lot. However, I wonder if there's a way to shrink the datatable's size, e.g., making the font and the table smaller. How should I do this? Let's say I have the…
Miller Zhu
  • 637
  • 1
  • 7
  • 15
15
votes
2 answers

R shiny mouseover text for table columns

How can I create mouseover text for column names in R shiny data table display. I'm trying to provide some text for users to understand the column names. I checked in DT package also and I couldn't find a solution. I can create labels for column…
Sri
  • 970
  • 1
  • 14
  • 26
14
votes
2 answers

How can I reduce row height in DT datatables

I would like to be able to get 'slimmer' rows when rendering a DT datatable (ie decrease that height) options(digits.secs=6) library(data.table) d = data.table(x = 1:10,time = as.POSIXct('2015-03-23 12:00:00.123')) library(DT) datatable(d)
statquant
  • 12,389
  • 13
  • 75
  • 148
14
votes
1 answer

How to hide a column using the DT package - columnDefs parameter doesn't work

I would like to hide a column (col4 in example below) in a dataframe using the DT package. I've incorporated the code snippet found here, to no avail - col4 still shows. Here is my sessionInfo, along with my reproducible example. >…
matsuo_basho
  • 2,059
  • 7
  • 20
  • 39
14
votes
4 answers

Add comma to numbers every three digits in datatable (R)

Suppose my data looks like this: df1 = data.frame(A=c(1000000.51,5000.33), B=c(0.565,0.794)) I want to use DataTables and have column A be (1,000,001 ; 5,000) library(DT) datatable(df1) %>% formatPercentage('B', 2) %>% formatRound('A',digits =…
Ignacio
  • 6,566
  • 8
  • 51
  • 99
13
votes
2 answers

R Shiny DT - edit values in table with reactive

Is it possible to update a reactive data source by editing the DT::DataTable? Below code is based on this code with change that x is made reactive. The problem starts when trying to change x in observeEvent. The purpose of having x reactive is…
Vlad
  • 2,253
  • 3
  • 17
  • 41
13
votes
3 answers

R shiny datatable filter box size to narrow to see text

I'm building an R shiny dashboard and when I put my data in a table using the DT package and renderdatatable(). At the top of each column, I have filters, the search box is too narrow to see the text and select an option. Here's an image: Does…
Tracy
  • 639
  • 1
  • 8
  • 19
1
2 3
93 94