Shiny

renderPrint option in ShinyApp

穿精又带淫゛_ 提交于 2020-02-24 14:01:30
问题 I'm using the renderPrint function in a ShinyApp to show calculation results. The results come with a [1],[2] etc in front. Is there a way to get rid of that? Also, can one change fonts of the output? 回答1: You could use renderText instead of renderPrint . Or maybe withMathJax() could also be an option? For styling your app, there are several ways to do that. You can read about that here. I include the css directly in the app in the following example. For small adaptations thats maybe the

Change placeholder color of textInput shiny widget

瘦欲@ 提交于 2020-02-24 05:36:45
问题 with some CSS code found in different old posts on Stackoverflow I managed to change the placeholder colour of every selectizeInput and selectInput widget of my shinyapp, but it seems that this code doesn't work for the textInput widgets. Below you can find a basic reproducible example: library(shiny) ui <- fluidPage( tags$style(HTML("::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: red; opacity: 1; /* Firefox */} :-ms-input-placeholder { /* Internet Explorer 10-11 */ color:

Change placeholder color of textInput shiny widget

大城市里の小女人 提交于 2020-02-24 05:36:13
问题 with some CSS code found in different old posts on Stackoverflow I managed to change the placeholder colour of every selectizeInput and selectInput widget of my shinyapp, but it seems that this code doesn't work for the textInput widgets. Below you can find a basic reproducible example: library(shiny) ui <- fluidPage( tags$style(HTML("::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: red; opacity: 1; /* Firefox */} :-ms-input-placeholder { /* Internet Explorer 10-11 */ color:

Trigger query based on selected date range in Shiny R

限于喜欢 提交于 2020-02-24 04:28:10
问题 I have exctracted below mentioned dataframe in R using SQL query. Query<-paste0("select ID, Date, Value, Result From Table1 where date(date)>='2018-07-01' and date(date)<='2018-08-31');") Dev1<-dbgetquery(database,Query) Dev1: ID Date Value Result KK-112 2018-07-01 15:37:45 ACR Pending KK-113 2018-07-05 18:14:25 ACR Pass KK-114 2018-07-07 13:21:55 ARR Accepted KK-115 2018-07-12 07:47:05 ARR Rejected KK-116 2018-07-04 11:31:12 RTR Duplicate KK-117 2018-07-07 03:27:15 ACR Pending KK-118 2018-07

Error: unused arguments in Shiny (R)

…衆ロ難τιáo~ 提交于 2020-02-23 10:20:34
问题 I wanted to begin by modifying a few components of one of the basic shiny example apps, but I keep getting this error: ERROR: unused arguments (fluidRow(column(4, tags$hr(), verbatimTextOutput("out1"), selectInput("in1", "Options", choices = state.name, multiple = TRUE, selectize = FALSE))), fluidRow(column(4, tags$hr(), verbatimTextOutput("out2"), selectInput("in2", "Options", choices = state.name, multiple = TRUE, selectize = FALSE)))) Here is my code: ui.R library(shiny) library

Error: unused arguments in Shiny (R)

寵の児 提交于 2020-02-23 10:14:00
问题 I wanted to begin by modifying a few components of one of the basic shiny example apps, but I keep getting this error: ERROR: unused arguments (fluidRow(column(4, tags$hr(), verbatimTextOutput("out1"), selectInput("in1", "Options", choices = state.name, multiple = TRUE, selectize = FALSE))), fluidRow(column(4, tags$hr(), verbatimTextOutput("out2"), selectInput("in2", "Options", choices = state.name, multiple = TRUE, selectize = FALSE)))) Here is my code: ui.R library(shiny) library

ggplotly text aesthetic causing geom_line to not display

喜你入骨 提交于 2020-02-23 09:02:48
问题 I'm trying to render a simple geom_line with a tooltip defined by a text aesthetic. q <- ggplot(data = graphDataFactor(), aes(x = Dates, y=Variable_Data, colour = Variable_Name #, #text = paste('Date: ', as.Date(Dates), #'<br>Variable:', Variable_Name, #'<br>Var Unit:', Variable_Data #) )) + geom_line(size = 1) + labs(colour = "Variables") ggplotly(q #, tooltip = c("text") ) So this code with the text aesthetic commented out works fine and renders the line. However, when I try to use the text

How to extend a table cell across multiple columns when rendered in R Shiny?

北慕城南 提交于 2020-02-23 07:20:04
问题 I have a dataframe of values that I'm attempting to render as a table in R Shiny. There are certain values which I want to extend to take up multiple columns in the same way in which you'd use the HTML rowspan attribute. However, if I were to do that I'd have to create the whole table from scratch, and I would much prefer to use the DT library for easy conversion from my datatable. As an example I've created the following script: # ui.R fluidPage( DT::dataTableOutput("table") ) # server.R

How to text wrap choices from a pickerInput, If the length of the choices are long the choices often end up outside the screen

痞子三分冷 提交于 2020-02-20 09:45:08
问题 The choices in the pickerInput always come in single line. Is there a way in which they can be brought to the next line? This is a problem when the length of the choice is very long making the choice go out of the screen. I specifically need pickerInput because it has live search, select all/deselect all feature in it. library("shiny") library("shinyWidgets") ui <- fluidPage( pickerInput(inputId="id",label="Some name", choices=c("Choice 1 is small","Choice 2 is average sized", "But choice 3

Expanding and collapsing child rows in Shiny DataTable

社会主义新天地 提交于 2020-02-20 09:13:03
问题 I'm having trouble replicating a datatable object in Shiny. Currently, I can display what I want when I run the data table portion of the code outside of a Shiny environment. However, when I run the entire code, it's not displaying the child table. library(DT) library(data.table) library(shiny) shinyApp( ui = fluidPage(DT::dataTableOutput('tbl')), server = function(input, output) { output$tbl = DT::renderDataTable( datatable({ #Transform dataframe to data.table and turn the dataframe rowname