dt

Format a vector of rows in italic and red font in R DT (datatable)

杀马特。学长 韩版系。学妹 提交于 2019-11-28 01:44:29
A bit similar to this question: How to give color to a given interval of rows of a DT table? but in my case I would like to let the user select rows in the table, then on click of a button deselect the rows, and turn the previously selected rows that are now part of the list of rows submitted for removal grayed out font (color: light gray) and in italic. This to indicate that these will be excluded from further analysis. Secondly a button to undo the entire selection should change all rows back to normal format I've gotten as far as recording the selected rows and adding the deselect feature,

R Shiny, how to make datatable react to checkboxes in datatable

廉价感情. 提交于 2019-11-28 01:23:54
问题 I would like my datatable to display content which depends on the status of checkboxes contained in the table. I have found help with both, including checkboxes in a DT as well as changing data table content, but when I try and combine these solutions I don't get what I want. When checking a box, the table is redrawn twice, the first time the way I want but a moment later it switches back. This is the code which should almost do... Is there someone out there to help before I get crazy?

tooltip or popover in Shiny datatables for row names?

落爺英雄遲暮 提交于 2019-11-28 01:18:07
问题 I’m stuck with trying to include something like a tooltip or popover with additional info when the user hovers over / clicks on the row names of a datatable, so they don’t have to look up some definitions, which I currently have on a different tabPanel. Here's a working example: server.R: library(shiny) library(DT) library(shinyBS) # Define server for the Shiny app shinyServer(function(input, output,session) { tdata <- as.data.frame(iris) # Render table here output$mytable <- DT:

R Shiny DT - edit values in table with reactive

戏子无情 提交于 2019-11-28 00:27:36
问题 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 that I intend to source it from an external database, then have edits to the DT::DataTable write back to the database so that it stays in sync with what the user sees (I'm fine with doing that - it is not part of the question). library(shiny) library(DT

Shrink DT::dataTableOutput Size

这一生的挚爱 提交于 2019-11-27 23:36:04
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 following code: foo <- function(){ shinyApp( ui = fluidPage( DT::dataTableOutput("table") ), server <- function(input, output) { x <- data.frame(1:5, 2:6) output$table <- DT::renderDataTable(x) } ) } What options or tags should I add? Try adding width: 75% to your style parameter of the div : div(DT::dataTableOutput("table"), style = "font-size: 75%; width

Hide certain columns in a responsive data table using DT package

依然范特西╮ 提交于 2019-11-27 17:29:01
问题 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 = function(input, output) { output$tbl = DT::renderDataTable( iris,extensions="Responsive" ) } ) This output gives me 5 columns. It only hides columns when I narrow the page. But, I want to hide last 3 columns in advance and I just want to see first two

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

六月ゝ 毕业季﹏ 提交于 2019-11-27 17:06:32
问题 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 options reference there is no rownames option output$subsettingTable <- DT::renderDataTable( subsetTable(), filter = 'top', server = FALSE, options = list(pageLength = 5, autoWidth = TRUE, rownames= FALSE )) My question is similar to the one here. The

R Shiny selectedInput inside renderDataTable cells

不问归期 提交于 2019-11-27 15:23:24
I search for solution to put selectedInputs in renderDataTable cells. I found js solutions: https://datatables.net/examples/api/form.html , however I do not know how to implement this solution in shinyjs as renderDataTable object. I would be grateful for hints / ideas / solutions how to implement editable renderDataTable in shiny. Carl Very similar to this: adding a column with TRUE/FALSE and showing that as a checkbox library(shiny) library(DT) runApp(list( ui = basicPage( h2('The mtcars data'), DT::dataTableOutput('mytable'), h2("Selected"), tableOutput("checked") ), server = function(input,

Pre-select rows of a dynamic DT in shiny

吃可爱长大的小学妹 提交于 2019-11-27 08:33:55
问题 This question is the more dynamic version of this. I have a DT in shiny app that could be empty at initialization. I'd like to pre-select all rows in DT. My first try is like this: library(shiny) library(DT) shinyApp( ui = fluidPage( fluidRow( radioButtons("select", "", c("none", "iris")), DT::dataTableOutput('x1') ) ), server = function(input, output, session) { data <- reactive({ if (input$select == "none") { return(NULL) } else if (input$select == "iris"){ return(iris) } }) output$x1 = DT:

R shiny mouseover text for table columns

牧云@^-^@ 提交于 2019-11-27 05:37:41
问题 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 names and display all of them when a user checks a box, this takes a lot of real estate and I don't want that. Any tips? 回答1: To expand my comment above, here is an example showing what I meant by using the title attributes: library(DT) sketch =