shiny-server

Shinydashboard - Change background based on selected tab

那年仲夏 提交于 2020-01-14 01:47:47
问题 I am creating a dashboard using Shinydashboard package, where I need to change the background color based on the selected Tab. I have tried the following code, but it is not working as intended. library(shiny) library(shinydashboard) library(dplyr) ui <- dashboardPage(dashboardHeader(dropdownMenuOutput("notificationMenu")), dashboardSidebar(sidebarMenu(menuItem("Page 1", tabName = "page1"), menuItem("Page 2", tabName = "page2"))), dashboardBody(tags$style(".content {background-color: #f7f7f7;

pandoc document conversion failed with error 127

99封情书 提交于 2020-01-11 08:27:28
问题 I'm not sure how to make a reproducible example of this, but I'm curious to hear if anyone else has encountered this problem. I have an R Markdown file hosted via shiny server on an EC2 instance running Ubuntu. Everything was working fine for days and now suddenly I get the following error when I try to view the document in the browser: pandoc document conversion failed with error 127 I'm not converting to pdf, haven't pushed any changes, and it was working a few hours ago. I'm not finding

Save and Load user selections based on file selection - RShiny

馋奶兔 提交于 2020-01-06 18:42:09
问题 I am trying to create simple app that acts as a GUI for studying different files having same variables but with different version and content. I am unable to give an app where every time the user opens the app they dont have to enter in their parameters again where they left off. I'd like them to be able to save their parameters and bring them up again when they go back to the app. I am giving my sample code here, however the number of inputs and plots are far more in the actual app. I want

How to extract the values of dynamically generated inputs in Shiny?

我与影子孤独终老i 提交于 2020-01-02 07:31:30
问题 I am creating a shiny app which will generate the score for clients based on their different features. In my shiny app, I have provided the checkboxGroupInput to select the required features. Based on the selected features app will dynamically add numericInput to the web ui so that user can assign the weight for the selected features and further the weights will be used in score calculation. I have tried different ways to get the selected features and wanted to save them in a vector. So that

R Shiny Make slider value dynamic

白昼怎懂夜的黑 提交于 2020-01-01 05:09:08
问题 I've got a dropdown selector and a slider scale. I want to render a plot with the drop down selector being the source of data. - I've got this part working I simply want the slider's max value to change based on which dataset is selected. Any suggestions? server.R library(shiny) shinyServer(function(input, output) { source("profile_plot.R") load("test.Rdata") output$distPlot <- renderPlot({ if(input$selection == "raw") { plot_data <- as.matrix(obatch[1:input$probes,1:36]) } else if(input

Google Analytics for Shiny Dashboard App

这一生的挚爱 提交于 2019-12-31 03:05:14
问题 I have a well sorted out R shiny (shinydashboard) app that runs on a server. I want to be able to track its usage and know that google analytics is a good solution for this. But I have run into an issue setting it up. I have tried following the directions described here https://shiny.rstudio.com/articles/google-analytics.html They suggest the creation of a google-analytics.js script containing the global site tag from google: <!-- Global Site Tag (gtag.js) - Google Analytics --> <script async

Receiving data from .js in server.R shiny

我们两清 提交于 2019-12-30 13:34:13
问题 How would I receive data, created in a .js file in the server.R in shiny? I am using the leaflat library and I need the extend the LatLngBounds of the current map view has. I need this variable in the server.R for furhter processing. So i have mycode.js //get bounds of extend of view $(document).ready(function() { var myBounds = map.getBounds(); Shiny.onInputChange("bounds", myBounds); }); which I include in the ui.R like tags$body(tags$script(src="mycode.js")) Thats how my Server.R looks

Packages missing in shiny-server

ε祈祈猫儿з 提交于 2019-12-29 07:11:47
问题 I am trying to create a web application using shiny. It requires me to load a package I have installed on my computer. For example: ## Contents ui.R: library(shiny) library(plyr) shinyUI(pageWithSidebar( headerPanel("Hello Shiny!"), sidebarPanel( sliderInput("obs", "Number of observations:", min = 0, max = 1000, value = 500) ), mainPanel( plotOutput("distPlot") ) )) ## Contents server.R: library(shiny) library(plyr) shinyServer(function(input, output) { output$distPlot <- renderPlot({ #

Nested observeEvent() in observer() gets executed too often

心已入冬 提交于 2019-12-25 07:12:01
问题 My code looks like observe ({ #subset someDataframe which I need in the observeEvent() observeEvent(input$Numbers{ #if not NULL, do something with subsetted dataframe }) }) I have an observe() function which gets input from the ui.R . Depending on the input, I subset a dataframe which will be displayed in the app. There is the need for further subsetting, but this field can be empty. To avoid the Unhandled Error if the selection is empty (thus, NULL ) is use the observeEvent() function. If

grouped bar plot in shiny with select input

让人想犯罪 __ 提交于 2019-12-25 01:08:47
问题 I have multiple select inputs that control the output of a single bar graph currently. When you use the first selectinput, it will select the data source. There is a secondary selectinput which selects the variable from the first data source. The code below works when you have a non grouped bar plot. I am trying to create a double bar plot and I have another data source separate from the one I am using for the current plot. The two main data sources that have the exact same variables. However