Shiny

Using formattable and plotly simultaneously

假装没事ソ 提交于 2019-12-30 11:14:10
问题 If formattable and plotly are used simultaneously the error "Error in last_plot() : The last plot doesn't exist" is given if the following code is run which is a problem already mentioned by Nico Katze in the comment section of http://www.magesblog.com/2016/01/formatting-table-output-in-r.html. library(formattable) library(plotly) DF <- data.frame(Ticker=c("", "", "", "IBM", "AAPL", "MSFT"), Name=c("Dow Jones", "S&P 500", "Technology", "IBM", "Apple", "Microsoft"), Value=accounting(c(15988.08

Conditional formatting in DT Data Table R Shiny

五迷三道 提交于 2019-12-30 10:54:27
问题 I have a table with 5 cols and 1st column as character and other four as numeric. I am using DT Data Table to display the same in Shiny App. Now, I need to compare each of the four cols for each row and color code the row cell which has maximum value . Looking for ways to do the same. Had a look on this link as well StylingCells but all the cols are numeric here. Code entity <- c('entity1', 'entity2', 'entity3') value1 <- c(21000, 23400, 26800) value2 <- c(21234, 23445, 26834) value3 <- c

How do I make dynamically created inputs in R/Shiny flow like normal inputs in flowLayout?

本秂侑毒 提交于 2019-12-30 10:53:17
问题 I have a mix of dynamically created inputs and normally defined inputs. The dynamically created inputs behave like a large vertically stacked block that the other inputs flow around. How do I make them all flow together? This reproduces the issue: library(shinydashboard) shinyApp( ui = dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( flowLayout( uiOutput('input_fields'), textInput('fielda','Field A',''), textInput('fieldb','Field B',''), textInput('fieldc','Field C',''),

clearShapes() not working — leaflet() for R

泪湿孤枕 提交于 2019-12-30 10:07:25
问题 I cannot figure out why clearshapes() is not working in my leaflet shiny program. I am trying to remove the existing circles and replace with a category that is selected based on the input check box that I have. However, what happens is that new circles are overlayed on top of the existing ones. Anyone encounter this before? df = read.csv("mappingData.csv",header=T, sep =",") ui = fluidPage( checkboxGroupInput("set", label = "Pothole Reported by:", choices = list("Citizens Connect App" =

Displaying radio button in elements in Shiny in a horizontal order instead of default vertical view

情到浓时终转凉″ 提交于 2019-12-30 08:15:24
问题 I'm working on a Shiny app that enables folk to browse some time series data. I have a number of widgets that enable people to select variables and type of analysis. In between, I have a modest radioButton mechanism that allows users to select time series for some variables: radioButtons("radio_year_select","Year", c("1999" = "1999", "2001" = "2001"))), The code generates a simple widget: In the context of this particular application, I would like to have the options presented in a horizontal

reactive change min/max range + 2 dataframes Shiny

大憨熊 提交于 2019-12-30 07:49:31
问题 I have one problem with my Shiny app. Firstly, I have two dataframes in which there are two numeric columns ( number and number2 ). I also have dynamic ui sliderInput . Shiny app works fine till... when I choose Item dataframe, choose number in Y-axis variable and set range in sliderInput between e.g. 15 and 18, and after that I want to change Y-axis variable to number2 I get an error: Error in eval(substitute(expr), envir, enclos) : wrong result size (2), expected 0 or 1 I know that the

Shiny - dynamic data filters using insertUI

一笑奈何 提交于 2019-12-30 07:21:10
问题 I am new to shiny and was trying to write an app where the user can dynamically add data filters (see code below). I thought insertUI and remove UI are pretty cool for that purpose. However, I have several problems: 1) I cannot address dynamically generates input$ids (see filterId in the code, l. 36 and l. 58) 2) in updateCheckboxGroupInput (l. 62) checkboxes are not preselected. 3) I cannot select data rows using which() (l. 74) 4) The checkboxes are not displayed inside the column, but

Shiny - dynamic data filters using insertUI

。_饼干妹妹 提交于 2019-12-30 07:21:09
问题 I am new to shiny and was trying to write an app where the user can dynamically add data filters (see code below). I thought insertUI and remove UI are pretty cool for that purpose. However, I have several problems: 1) I cannot address dynamically generates input$ids (see filterId in the code, l. 36 and l. 58) 2) in updateCheckboxGroupInput (l. 62) checkboxes are not preselected. 3) I cannot select data rows using which() (l. 74) 4) The checkboxes are not displayed inside the column, but

[Shiny]: Add link to another tabPanel in another tabPanel

瘦欲@ 提交于 2019-12-30 07:01:09
问题 I'm trying to put a link on my "home" tabPanel to all others tabPanels of my app. The idea is as follows: ui = navbarPage("", tabPanel("home", fluidPage( fluidRow(box("this 1st box should lead me to tab1a")), fluidRow(box("this 2nd box should lead me to tab1b")), fluidRow(box("this 2nd box should lead me to tab2"))) ), navbarMenu("tab1", tabPanel("tab1a"), tabPanel("tab1b")), tabPanel("tab2") ) shinyApp(ui, server=function(input, output) {}) I've seen the answer in Add link panel tabs in

Shiny splitLayout and selectInput issue

断了今生、忘了曾经 提交于 2019-12-30 06:36:06
问题 When I combine the splitLayout and selectInput in R Shiny, there is something wrong. The dropdown list of choices cannot be displayed properly. How can we address this issue. Please check the reproducible code. library(shiny) server <- function(input, session, output) { output$select_1 = renderUI({ selectInput("select_input","select", choices = LETTERS) }) } ui <- fluidPage( splitLayout( uiOutput("select_1") ) ) shinyApp(ui = ui, server = server) I have 8 selectInputs that I want to place