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
0
votes
1 answer

How to edit table column names in shiny and save the table for further analysis?

I Want to edit table column names in shiny and save it for further analysis. I have added a piece of code which allows me to edit the colnames in the table. Please see the example below. With this simple example here. I can edit the column names by…
Wang
  • 1,314
  • 14
  • 21
0
votes
1 answer

Add custom text when hovering over each row of datatable

I have the datatable below in which when I hover in each row I should get: when hovering on 1st row: “Total cases in the world” when hovering on 2nd row: “Total deaths in the world” when hovering on 3rd row: “Total cases in the selected…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
1 answer

Datatable (DT) Shiny R - Custom SearchPane from comma-separated string

I'm trying to create a DT SearchPanes custom filter that treats a column that is a comma-separated string as separate entries. I know how to make this work in Datatables (see here), but I'm struggling with using the proper syntax to get it to work…
lrc
  • 3
  • 2
0
votes
1 answer

Make DT in-table filters responsive to subsetted data

I am creating a table in which I want users to have the ability to first filter the data with widgets to reduce the dataset, but still want users to be able to use the built-in DT filters to further reduce the data. However, when taking this…
0
votes
1 answer

DT callback/conditional styling doesn't work after editing in an R Shiny context

I'm having the following problem. I want to conditionally format my columns so that values in column 2 that are non-positive are coloured red. I also want this condition to hold afte a cell has been edited. For example: library(DT) df <-…
Viet Dang
  • 37
  • 4
0
votes
1 answer

Ranking Based on a number of conditions

I am looking to form a ranking that is dependent on a pairing. So say i have a matrix subject stim1 stim2 Chosen Tchosen 1: 1 34 35 34 32 2: 1 34 36 34 25 3: 1 34 36 36 6 4: …
user15791858
  • 175
  • 5
0
votes
0 answers

Questions regarding DT edition in a Shiny context

I am discovering the edition functionnality of a DT object in a Shiny context. I was wondering why in the official example (here) Yihui Xie - the author - uses a dedicated function editData() to capture the user edition rather than simply retrieving…
yeahman269
  • 705
  • 7
  • 16
0
votes
1 answer

Toggle between plot and table using the same actionButton in a shiny app

I have the shiny app below and I would like to toggle between a plot (default) and its table using the same actionButton(). library(shiny) library(DT) ui <- fluidPage( sidebarLayout( sidebarPanel( actionButton("exc", …
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
0 answers

Write exponents as superscripts

consider the following list of numbers in R list_num<-c(1,10, 100, NA, 0.1) Can this be printed in this format The printing should be as if they are numbers so that we can sort the same. I request someone to help a bit. I am unable to find a…
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29
0
votes
1 answer

Unable to fix the first column using renderDT in R Shiny?

In the example that I posted below, I have a df with 100 rows and 100 columns with numeric values (except the first column) that I would like to print with sequential color scale on the main panel in Shiny. Since all columns don’t fit in a single…
Mohamad Sahil
  • 165
  • 2
  • 12
0
votes
1 answer

Change backgorund color of cell of data table while its value is edited in Rshiny

I have renderDatatable with editable=TRUE options, what i am looking for is when user modify any value of cell, the cell background color should change (say -"green"). it is necessary because end user can have an idea about the changes he/she has…
0
votes
0 answers

R shiny DT datatable: read, edit, save

I need to do something extremely similar to what asked and answered here: How to edit and save changes made on Shiny dataTable using DT package The key difference is that in my case the dataframe (table) is not a global variable. Data is stored in a…
Angelo
  • 1,594
  • 5
  • 17
  • 50
0
votes
1 answer

Shiny - Downloading DT table without downloading action buttons

I am having trouble with the download/copy/print etc buttons in Shiny and can't get any of the suggested fixes to work. I have a DT table in Shiny with buttons to download as CSV etc. It is a two-column table. There is also a third column with a…
0
votes
2 answers

Conditional format two columns based on column values using DT package

For example using the mtcars dataset library(tidyverse) library(DT) dat <- mtcars I want to color the background of the dat$disp column of the table based on the value in it. i.e. if the value is below 150 color green, if it is between 150 and 250…
Pad
  • 841
  • 2
  • 17
  • 45
0
votes
1 answer

RenderDT won't show when rendered

I have a very simple flexdashboard where I would like display the iris data in a table using DT::renderDT(iris). It renders when I click "knit" in RStudio, but when I run markdown::render("test.Rmd") I get junk. It won't render on shinyapps.io…
HCAI
  • 2,213
  • 8
  • 33
  • 65