dt

Searching Columns in R shiny Datatable that has Multiple Entries

老子叫甜甜 提交于 2021-02-11 11:24:16
问题 I have a datatable in R Shiny, and one of the columns, Keywords, contains multiple entries for some rows, separated by a comma. I would like these multiple entries to be individually searchable. The default search feature for datatable treats these entries as one, long, single item. For example, row 2's value for the column Keywords is "Keyword1, Keyword2". I would like the user to be able to search for either "Keyword1" OR "Keyword2" and find row 2. Currently, the default search bar in

Display data table with buttons in each row using Shiny for a given data frame to appear as shown table

谁说胖子不能爱 提交于 2021-02-08 09:52:42
问题 Here is the data frame sports=data_frame(question=c("<h5>This gives you more information about pro Football What position would you prefer to play in pro Football?</h5>", "</h5>This gives you more information about pro Soccer What position would you prefer to play in pro Soccer?</h5>", "</h5>This gives you more information about pro Hockey What position would you prefer to play in pro Hockey?</h5>"), `Expected Money`= c(list(c('First Year = 10', 'First 3 Years= 50')), list(c('First Year = 15'

R shiny DT checkboxes in multiple tabs

纵饮孤独 提交于 2021-02-08 06:50:18
问题 I am working on a task similar to those described in RStudio Shiny list from checking rows in dataTables and Shiny - checkbox in table in shiny - embedding checkboxes within a DT table. My application is a little more complicated though - there are multiple tabs, the table can be filtered, and the content depends on reactive values elsewhere. I have been able to get the checkboxes working with a little JS, but have found if I have another DT table in another tab, the target table does not

shiny-bound-input class lost in R Shiny with DT and data.table

孤者浪人 提交于 2021-02-08 06:39:44
问题 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 reproducible example below, the shiny-input input$Sel_Group_1 created within the DT-output depends on the value chosen in the shiny-input input$selectGroup (values a or b). The selected item (values c,d,f,g) are then shown in the textoutput output$selectedItem . When I initially launch the app everything works fine, but as soon as I update the value in input

Copy a Shiny DT row to users clipboard

不羁的心 提交于 2021-02-07 19:51:49
问题 Is there a way to have the selected row(s) in a shiny datatable (DT) be available for the user to copy (Ctrl+C) to their clipboard. Ideally it would also supply the data table's column names or headers. UPDATE global.R library(rclipboard) library(shiny) ui.R: ... rclipboardSetup(), ... uiOutput("copy"), server.R: output$copy = renderUI({ s = input$orders_rows_selected rclipButton("copybtm","Copy",data()[s,],icon("clipboard")) }) 回答1: Here is how to get a button to copy the selected rows. And

Shiny datatable: popup data about selected row in a new window

梦想的初衷 提交于 2021-02-07 18:17:21
问题 I have a datatable in shiny. When a user selects a certain row, I want to display some other data based on the selected row in a new window. I tried to use shinyBS package but I could not use it without action button and I don't want to include action button. I want the pop up to display when a row is selected. Any ideas? mymtcars = head(mtcars) for_pop_up = 1:6 app <- shinyApp( ui = fluidPage( DT::dataTableOutput("mydatatable") ), server = shinyServer(function(input, output, session) {

Shiny datatable: popup data about selected row in a new window

孤者浪人 提交于 2021-02-07 18:16:31
问题 I have a datatable in shiny. When a user selects a certain row, I want to display some other data based on the selected row in a new window. I tried to use shinyBS package but I could not use it without action button and I don't want to include action button. I want the pop up to display when a row is selected. Any ideas? mymtcars = head(mtcars) for_pop_up = 1:6 app <- shinyApp( ui = fluidPage( DT::dataTableOutput("mydatatable") ), server = shinyServer(function(input, output, session) {

Shiny datatable filter box

孤街醉人 提交于 2021-02-07 10:25:20
问题 I have created a table which looks as per screenshot. How could I add an excel like filter button where I could select multiple specific items of the list? And code is the following: DT::datatable(current_list, rownames = FALSE, filter = 'top', options = list(pageLength = 50,lengthChange = FALSE,autoWidth = FALSE,escape=FALSE, searching = TRUE, columnDefs = list(list(className = 'dt-center', targets = 0:1), list(width = '30px', targets = 0:0), list(width = '270px', targets = 1:1) ) ) ) 回答1:

Shiny datatable filter box

▼魔方 西西 提交于 2021-02-07 10:24:09
问题 I have created a table which looks as per screenshot. How could I add an excel like filter button where I could select multiple specific items of the list? And code is the following: DT::datatable(current_list, rownames = FALSE, filter = 'top', options = list(pageLength = 50,lengthChange = FALSE,autoWidth = FALSE,escape=FALSE, searching = TRUE, columnDefs = list(list(className = 'dt-center', targets = 0:1), list(width = '30px', targets = 0:0), list(width = '270px', targets = 1:1) ) ) ) 回答1:

How to edit column names in datatable function when running R shiny app?

橙三吉。 提交于 2021-02-04 16:47:34
问题 I'm using datatable function from DT package in R Shiny and I want that the user of my app can edit the column names (the variable names). Is there any option to do that? For now I'm using a text input "old_var_name", a text input "new_var_name" and an actionbutton "update_variable_name". But at this point, I'm only able to change on variable name at the time. I want the user to be able to change as much as variable names he wants. Server: tab <- eventReactive(input$import,{ inFile <- input