shinydashboard

make a query and data frame reactive and refresh it on every 5 minutes

浪尽此生 提交于 2019-12-13 02:44:42
问题 // library(plyr) library(shiny) library(ggplot2) library(scales) library(shinydashboard) library(gridExtra) library(DT) library(ggthemes) library(plotly) library(data.table) library(plotrix) library(shinyjs) library(shinycssloaders) # connection with dash db shinyServer(function(input, output, session) { # withProgress(message = 'Data Downloading', # detail = 'This may take a while...', value = 0, { # for (i in 1:15) { # incProgress(1/15) # Sys.sleep(10) # }}) dsn_driver = "" dsn_database = "

R Shiny different users

别来无恙 提交于 2019-12-13 00:44:32
问题 I have created an app in R shiny that is practically a dashboard for KPIs.I have written it in two files, ui.r and server.r and what I am now trying to do is to add a login page and render different dashboards for different users.For example,the manager should see one dashboard and the employees should see another one.The problem is that I do not know how to convert my solution in something that uses functions and still see the html page that I have built separately before I added the login

Using shiny plotOutput in multiple places in R

旧城冷巷雨未停 提交于 2019-12-12 23:25:52
问题 I am trying to use plotOutput in R shiny in multiple sub-menu items. However, I believe it is not possible for plotOutput to be used at multiple places with same id. Please help me if it is possible somehow. attaching the snapshot for reference. library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar( sidebarMenu( id = "tabs", menuItem("Charts", icon = icon("bar-chart-o"), menuSubItem("Sub-item 1", tabName = "subitem1"), menuSubItem("Sub-item 2",

Shiny: How to initialize empty reactiveValues with an actionButton?

拟墨画扇 提交于 2019-12-12 19:21:42
问题 Background: In my app, I have built a pop-up modal wherein users can define variables/parameters and they're subsequently stored in a reactiveValues() once an actionButton is pressed. This appears to work fine. The problem: I have a separate actionButton which is supposed to clear/empty the reactiveValues that holds the inputs above. Unfortunately, this doesn't seem to work--that is, pressing the button doesn't do anything. Minimally-reproducible code: library(DT) # UI modules sidebarCharts <

Can shinydashboard use Tabpanels and have a nav bar?

為{幸葍}努か 提交于 2019-12-12 14:00:13
问题 I am currently using shinydashboard but I would like to have different sidbar menues associated with content in the main body. Is this possible with shinydashboard? For example: I would like to have something like this https://gallery.shinyapps.io/CDCPlot/ See how when you click on the nav bar options the sidebar menu changes as well as the body. Is that possible in shinydashboad? I like the look and feel of shinydashboard and would rather not go back to shiny. THe underlying code is here:

Shiny dashboard does not scale well

断了今生、忘了曾经 提交于 2019-12-12 13:37:19
问题 I took the second example from http://rstudio.github.io/shinydashboard/get_started.html and the problem is that for some types of rendering the scaling is not good. Dashboard opened: Dashboard closed: Dashboard closed and open console(this time it scales the plot as it should have done from begining) Is it possible to rerender the plot when the dashboard is closed/opened? 回答1: You can force a resize event on the window when the dashboard open/close button is clicked by using jQuery to bind a

Shinydashboard: 'restoreInput' is not an exported object from 'namespace:shiny'

喜欢而已 提交于 2019-12-12 13:33:27
问题 I am using RStudio to create a new Shiny app. I copy and paste the code sample from https://rdrr.io/cran/shinydashboard/man/renderValueBox.html into the app.R. I receive this error: Warning: Error in : 'restoreInput' is not an exported object from 'namespace:shiny' Stack trace (innermost first): 45: getExportedValue 44: :: 43: dashboardSidebar 42: inherits 41: tagAssert 40: dashboardPage 1: runApp Error : 'restoreInput' is not an exported object from 'namespace:shiny' Here is my sessionInfo()

Show box only when data is loaded in shiny app

一个人想着一个人 提交于 2019-12-12 13:26:15
问题 I have made a shiny app in which I want to upload and display it beside it. Since my data will be huge so I made it scroll-able and put it in a box. Now I want to show the box only when data is loaded. I tried conditional panel but it didn't work. Here is the code ui.R library(shiny) library(shinydashboard) library(DT) library(ggvis) library(shiny) ui <- dashboardPage( dashboardHeader(title = "Dashboard"), dashboardSidebar(sidebarMenu( menuItem("Data", tabName = "uploadData", icon = icon(

unable to place logo / image in Shiny App

坚强是说给别人听的谎言 提交于 2019-12-12 10:20:03
问题 I'm trying my best to place a logo in my shiny app, but its showing blue question mark every time. I made a separate ui and server file as well but still didn't work. I also made a 'www' folder and set it as a working directly with image inside it, but no result. Can someone please guide me? library(dplyr) library(shiny) library(shinythemes) #UI ui = fluidPage(img(src = "picture.jpg"), fluidRow( rpivotTableOutput("pivot"))) #Server server = function(input, output, session) {reactive({ mtcars

Is there a way to deploy R shiny apps as web page using windows server?

霸气de小男生 提交于 2019-12-12 09:27:13
问题 Let me know if there is a way to deploy shiny dashboards as a webpage using windows server. I know it is possible using Linux but it need it for windows. 回答1: If you put below code as last lines: app <- shinyApp(ui,server) runApp(app,host="0.0.0.0",port=5050) Then to run you Shiny App in any other machine just give the IP of the machine where the code is deployed and the port number which is 5050 in this case. So, for example if you code is deployed on a machine with IP: 123.12.123.12 then