dt

Highlight word in DT in shiny based on regex

偶尔善良 提交于 2019-12-10 14:06:17
问题 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 "stone", highlighting the "on" in the middle. EXAMPLE IMAGE: I can refine the search options so regex = TRUE , but then no highlighting occurs. This is also true if I want to use regex like "on|in", for example. EXAMPLE (including regex): library(shiny)

Add Cell Borders in an R Datatable

自闭症网瘾萝莉.ら 提交于 2019-12-10 12:06:42
问题 Fairly new to R - doing OK with big picture stuff, and struggling on cleaning up the edges when I want to present something to other people. Banging my head against the wall with something that's probably pretty simple - I simply want to add cell borders - to all cells - in a datatable in a shiny app. Here's a relevant chunk of code: library(ggplot2) library(shiny) library(data.table) library(DT) library(plotly) setwd("C:/Users/Will/Desktop/FinalPages") lister <- read.table("PlayerList.csv",

How to mark last row in results of DataTable using R

情到浓时终转凉″ 提交于 2019-12-10 12:05:50
问题 I would like to mark (for instance bold) the last row in Data Table generated using DT package. Let's say we have a table with the iris dataset: library(DT) datatable(iris) Results: So we have 150 rows and I would like to bold only 150 row . Edit : @BigDataScientist let me clear this. I have this: output$tbl <- DT::renderDataTable( data() %>% # let's say iris data - it doesn't matter bind_rows(summarise(data(), SUM = "SUM", A = sum(A), B = sum(B), C = sum(C), D = sum(D), E = sum(E), F = sum(F

Download button downloads only 145 rows in DataTables with Scroller

假如想象 提交于 2019-12-10 10:38:24
问题 We're sometimes handling tables with more than 400 000 rows, we are using server-side processing plug-in Scroller for DataTable on our page. We also want to download the table, but with the Scroller plug-in it always downloads only 145 rows. Can I somehow tell the download buttons to download full table and not only the loaded part? I'm doing this completely in R-Shiny with DT package, so any suggestions from this side would be also very appreciated. 来源: https://stackoverflow.com/questions

R shiny datatable filter box size to narrow to see text

南楼画角 提交于 2019-12-10 02:39:54
问题 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 anyone know of a way to increase the width? Here's my code for the datatable code in the server.r: output$table <- DT::renderDataTable(DT::datatable({ data <- rv$data if (input$sour != "All") { data <- data[data[,1] == input$sour,] }else{data} if (input

DT in Shiny and R: Custom number formatting

女生的网名这么多〃 提交于 2019-12-09 10:36:10
问题 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 this $1,234.5 (notice the change in the symbol, the position of the currency-symbol as well as the numbers after the decimal-point). An MWE looks like this: library(shiny) library(DT) shinyApp( # UI ui = fluidPage(DT::dataTableOutput('tbl')), #

Show dataTableOutput in modal in shiny app

青春壹個敷衍的年華 提交于 2019-12-09 07:21:16
问题 Great R community, I am just wondering if it is possible to show DT::dataTableOutput in a modal with the push of an action button. For example, data table output as something like following. Here is a some code to begin with: ## app.R ## library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), ## Sidebar content dashboardSidebar( sidebarMenu( menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")) ) ), ## Body content dashboardBody( tabItems( # First tab

Determine if DT datatable is clicked in shiny app

坚强是说给别人听的谎言 提交于 2019-12-09 06:51:05
问题 Here is a working example of my best attempt to get table click event: library(shiny) library(DT) runApp(shinyApp( ui = fluidPage(DT::dataTableOutput('table')), server = function(input, output, session) { output$table <- DT::renderDataTable({ dt <- data.frame(a = 1) datatable(dt, rownames = FALSE, selection = 'none') }) observeEvent(input$table_cell_clicked, { print(Sys.time()) })} )) The problem is that observeEvent reacts only if user clicks on the cell which differs from previously clicked

Adding a vertical and horizontal scroll bar to the DT table in R shiny

人盡茶涼 提交于 2019-12-09 05:00:20
问题 Please check the data table "Case Analyses Details" on the right. I want to fit the data table within the box, such that it aligns from right and bottom border in the box, such that we add a horizontal and vertical scroll bar to the DT which can be used to span the rows that overshoot the box. ## app.R ## library(shiny) library(shinydashboard) library(DT) ui <- dashboardPage( dashboardHeader(title = "My Chart"), dashboardSidebar( width = 0 ), dashboardBody( box(title = "Data Path", status =

How can I change the labels of these buttons in DT::Datatable in R and change collors of rows?

戏子无情 提交于 2019-12-08 13:23:28
问题 I need to change labels of Buttons DT::Datatable in R. Thanks for you help! O DT:Datatable está com a extensão que permite alguns recursos de formatação, mas não documenta todos. Ela usa a extensão Buttons para fitrar colunas na tabela. O botão "search" eu consegui mudar o atributo: language = list(search = 'Procurar:') Queria saber se alguém já usou esse recurso no shiny e se poderia me ajudar. ui.R library(shiny) library(readr) library(memoise) library(tm) library(wordcloud) library(DT)