Shiny

Display data table with buttons in each row using Shiny for a given data frame to appear as shown table

谁说胖子不能爱 提交于 2021-02-08 09:52:42
问题 Here is the data frame sports=data_frame(question=c("<h5>This gives you more information about pro Football What position would you prefer to play in pro Football?</h5>", "</h5>This gives you more information about pro Soccer What position would you prefer to play in pro Soccer?</h5>", "</h5>This gives you more information about pro Hockey What position would you prefer to play in pro Hockey?</h5>"), `Expected Money`= c(list(c('First Year = 10', 'First 3 Years= 50')), list(c('First Year = 15'

How do I make a Shiny app read continuously from a file?

余生长醉 提交于 2021-02-08 09:37:04
问题 I am writing a relatively simple Shiny app which basically needs to read a file, perform some calculations to create a new variable and output the mean value of the latest 5 points of this variable. A very simplified version of the app: require(shiny) x1 <- 42 df.data <- read.csv("data.csv") df.data$y2 <- df.data$y1/x1 ui <- fluidPage( h5(textOutput("calc1")) ) server <- function(input, output, session) { output$calc1 <- renderText({ az <- nrow(df.data) aa <- az - 5 y5m <- mean(df.data$y2[aa

R Shiny: Error Pushing Repository 504 Status when deploying App to Shinyapps

情到浓时终转凉″ 提交于 2021-02-08 08:46:34
问题 When I run rsconnect::deployApp() , the process starts as usual, but it fails before it finishes deploying the app. The total size of the app is just below 1GB. Could it be possible that that is the cause? I am sitting behind a corporate proxy, which seems like a plausible cause given the 504 error code, but I am able to upload other dashboards. For that same reason I do not believe the issue to be related to the packages I am using, since I have uploaded dashboards using the same packages.

Using Shiny's updateSelectInput within nested modules

十年热恋 提交于 2021-02-08 08:24:14
问题 Background The application is of the following structure: . ├── R │ ├── mod_observationSelector.R │ ├── mod_previewTable.R │ └── mod_summaryTable.R └── app.R With the files fulling the respective functions: mod_observationSelector.R - provides an updateSelectInput mechanism facilitating selction of integere or real columns in mtcars data mod_previewTable.R - generates head for selected column mod_summaryTable.R - generates summary for selected column Design assumptions mod_observationSelector

Using Shiny's updateSelectInput within nested modules

家住魔仙堡 提交于 2021-02-08 08:23:49
问题 Background The application is of the following structure: . ├── R │ ├── mod_observationSelector.R │ ├── mod_previewTable.R │ └── mod_summaryTable.R └── app.R With the files fulling the respective functions: mod_observationSelector.R - provides an updateSelectInput mechanism facilitating selction of integere or real columns in mtcars data mod_previewTable.R - generates head for selected column mod_summaryTable.R - generates summary for selected column Design assumptions mod_observationSelector

saving multiple plots in a single PDF in Shiny R

一曲冷凌霜 提交于 2021-02-08 07:41:03
问题 I am trying to export ggplots in my Shiny App into a single PDF file using the download handler but it is not working. The PDF file is getting saved but it gives me only the last ggplot instead of all three. Any help would be appreciated! Below is the code of the server: shinyServer(function(input, output, session) { plotinput() { df<-data.frame(q=c(1,3,5,7,9),w=c(2,4,6,8,10),z=c(1,2,3,4,5)) ggplot(df,aes(x=q,y=w))+geom_point() ggplot(df,aes(x=z,y=w))+geom_point() ggplot(df,aes(x=q,y=z))+geom

Dynamically populate a grouped list of choices in SelectInput (RShiny)

只谈情不闲聊 提交于 2021-02-08 07:40:49
问题 I would like to create a selectInput with options based on a data frame I load. These options should be grouped, as in the example below. I know how to do it when writing out in full, however, I want the dropdown list be be automated so it changes automatically when I change the data frame. I might change the list of groups, or the list of indicators withinin each group. DD <- data.frame(group=c("Diagnosis","Diagnosis", "Treatment", "Treatment", "Outcome", "Outcome", "Outcome"), Indicator

saving multiple plots in a single PDF in Shiny R

老子叫甜甜 提交于 2021-02-08 07:39:55
问题 I am trying to export ggplots in my Shiny App into a single PDF file using the download handler but it is not working. The PDF file is getting saved but it gives me only the last ggplot instead of all three. Any help would be appreciated! Below is the code of the server: shinyServer(function(input, output, session) { plotinput() { df<-data.frame(q=c(1,3,5,7,9),w=c(2,4,6,8,10),z=c(1,2,3,4,5)) ggplot(df,aes(x=q,y=w))+geom_point() ggplot(df,aes(x=z,y=w))+geom_point() ggplot(df,aes(x=q,y=z))+geom

R shiny DT checkboxes in multiple tabs

纵饮孤独 提交于 2021-02-08 06:50:18
问题 I am working on a task similar to those described in RStudio Shiny list from checking rows in dataTables and Shiny - checkbox in table in shiny - embedding checkboxes within a DT table. My application is a little more complicated though - there are multiple tabs, the table can be filtered, and the content depends on reactive values elsewhere. I have been able to get the checkboxes working with a little JS, but have found if I have another DT table in another tab, the target table does not

Click-event not triggering inside a Plotly subplot within Shiny

允我心安 提交于 2021-02-08 06:47:50
问题 I'm creating a shiny app with 2 different tabs. Each of them has a couple of plotly plots. I want the plots to only react to the plotly_click events from the correspondent tab. My problem comes when instead of having separated plots, I want one of them to be part of a subplot. To do so, I have added the source parameter to the plots in order to distinguish which plot is the one that has been clicked. When the plots are individual plots (not inside a subplot) works nicely, but if I try to put