Shiny

R Shiny: Updating an output before another (relatively long) computation is finished

孤街醉人 提交于 2021-02-11 07:10:27
问题 I have the following problem. My shiny app is basically doing the following on the server side after a button is clicked: observe({ isolate({ ## Here are a lots of computations with the results shown iteratively using invalidateLater(): }) if( computations not done ){ invalidateLater(500) } else { #Once the computations are done, I create a final output table and also a image. output$example <- renderTable( something based on the computations ) output$example2 <- renderPlot( something based

R Shiny: Updating an output before another (relatively long) computation is finished

◇◆丶佛笑我妖孽 提交于 2021-02-11 07:09:07
问题 I have the following problem. My shiny app is basically doing the following on the server side after a button is clicked: observe({ isolate({ ## Here are a lots of computations with the results shown iteratively using invalidateLater(): }) if( computations not done ){ invalidateLater(500) } else { #Once the computations are done, I create a final output table and also a image. output$example <- renderTable( something based on the computations ) output$example2 <- renderPlot( something based

Shiny Dashboard: Reset the conditional panel state when we navigate across different tabitems

柔情痞子 提交于 2021-02-11 07:08:01
问题 I have the following code in which there are various conditional panels in the dashboard. If we navigate from one conditional panel to next in dashboard and then go to widget and finally come back to dashboard, the dashboard is in the previous state. I want the dashboard to be refreshed(reset to original condition) when I come back from another tab panel. Is is possible to do that? library(shiny) library(shinydashboard) library(maps) library(leaflet) ui <- dashboardPage( dashboardHeader(title

R Shiny: Updating an output before another (relatively long) computation is finished

不羁的心 提交于 2021-02-11 07:07:52
问题 I have the following problem. My shiny app is basically doing the following on the server side after a button is clicked: observe({ isolate({ ## Here are a lots of computations with the results shown iteratively using invalidateLater(): }) if( computations not done ){ invalidateLater(500) } else { #Once the computations are done, I create a final output table and also a image. output$example <- renderTable( something based on the computations ) output$example2 <- renderPlot( something based

A way to not hardcode items in css with R Shiny app?

帅比萌擦擦* 提交于 2021-02-11 04:51:33
问题 I have the below code example (taken from here) . Is there a way for the below to work without hardcoding the values "a" and "b" in the html css? If I have hundreds of items I don't want to have to hardcode each one in the call to .option[data-value=a] etc. shinyApp( ui = shinyUI(fluidPage( tags$head( tags$style(HTML(" .option[data-value=a], .item[data-value=a]{ background: red !important; color: white !important; } .option[data-value=b], .item[data-value=b]{ background: green !important;

shiny htmlOutput() – export to pdf

天大地大妈咪最大 提交于 2021-02-11 00:57:41
问题 I want to export html objects from shiny app to pdf. In order to export table, I was using .Rmd template (based on How to make pdf download in shiny app response to user inputs?), however I do not know how to pass html object to PDF in shiny app. Example app: library(shiny) ui <- shinyUI( fluidPage( fluidRow( column(width=4, htmlOutput("Table1"), htmlOutput("Table2"), htmlOutput("Table3") )) ) ) server <- shinyServer(function(input, output, session){ #****************************************

Cannot connect remotely to shiny-server and get R app working properly

自闭症网瘾萝莉.ら 提交于 2021-02-11 00:37:53
问题 I HAVE FIXED THIS ISSUE. Please read answer below I have installed shiny-server on Ubuntu 14.04.4 LTS with VirtualBox. After forwarding port 3838 in my router and setting a bridged network, then assigning a static IP to my virtual Ubuntu machine, I am being able to connect remotely, from a computer outside from my network and visualize the "hello" example app page, but only the HTML code is rendered. Both R and markdown iframes are not working (connection is reset and they are grayed). On the

Cannot connect remotely to shiny-server and get R app working properly

回眸只為那壹抹淺笑 提交于 2021-02-11 00:33:56
问题 I HAVE FIXED THIS ISSUE. Please read answer below I have installed shiny-server on Ubuntu 14.04.4 LTS with VirtualBox. After forwarding port 3838 in my router and setting a bridged network, then assigning a static IP to my virtual Ubuntu machine, I am being able to connect remotely, from a computer outside from my network and visualize the "hello" example app page, but only the HTML code is rendered. Both R and markdown iframes are not working (connection is reset and they are grayed). On the

Creating a scatter plot using ggvis in a shiny app

最后都变了- 提交于 2021-02-10 20:11:45
问题 I am trying to create a simple app that does the following: Import a csv file as a reactive (this has to be a reactive) Print the contents of csv as data table in one tabPanel Create an interactive scatter plot using ggvis in another tabPanel However I am unable to create the plot- the tabPanel where plot is supposed to appear is blank. There is no error or warning messages in the console whatsoever. Not sure what is wrong with the code. Here is the code: # Define UI for application ui <-

R Shiny daterange shows non existent date in data

空扰寡人 提交于 2021-02-10 18:20:37
问题 I have a histogram plot that has dateRangeInput . the code for the menuItem is: menuItem(text = 'Plot', tabName = 'Plots', icon = icon('chart-bar')), conditionalPanel(condition = "input.menu == 'Plots'", dateRangeInput('daterange', 'Enter Start and End Date', start = min(wide_data$SampleTime), end = max(wide_data$SampleTime), min = min(wide_data$SampleTime), max = max(wide_data$SampleTime)), selectInput('UserSelect', 'Select a Vehicle', choices = c('All',unique(wide_data$device_user))),