Shiny

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

stripes for DT::datatable

独自空忆成欢 提交于 2020-01-02 07:23:41
问题 I am hoping to get a repeated pattern for the datatable in the code below where 3 rows are colored followed by 3 in white, then again colored... Can somebody please help me with code for that? Also, in my Shiny app there are several tables each of which may need different styles. Would appreciate an answer which shows how the style can be tied to a particular table so that I can use that to develop other styles for the other tables. require(shiny) require(DT) MkDF <- function(nr) { data.frame

Invalidate Later in Shiny

狂风中的少年 提交于 2020-01-02 07:17:09
问题 I am using invalidateLater(5000, session) in my Shiny code and it is working. Every 5 seconds I have a query that is refreshed and a plot is updated. BUT the screen and plots go GRAY every 5 seconds so it looks like the page is dead while the updating occurs. Is there a way to make ONLY the plots update and have the page avoid looking like it's dead? @JOhn - THank you here is my ui.r shinyUI(pageWithSidebar( headerPanel("tst"), sidebarPanel( sliderInput("n", "Number of plots", value=2, min=1,

Shiny How to dynamically select columns of imported dataset for further analysis

老子叫甜甜 提交于 2020-01-02 07:15:29
问题 I am trying a small shiny app wherein I load a CSV file from the local directory and then select specific columns from the dataframe and use this subsetted dataframe for further data analysis. library(shiny) # Define UI for application that draws a histogram ui <- fluidPage( # Application title titlePanel("Old Faithful Geyser Data"), # Sidebar with a slider input for number of bins sidebarLayout( sidebarPanel( fileInput("dataset", "Choose CSV File", multiple = TRUE, accept = c("text/csv",

Download and display PDF in Shiny

别说谁变了你拦得住时间么 提交于 2020-01-02 06:53:51
问题 I am trying to show some PDFs from around the web in an app on shinyapps.io. Unfortunately, the standard way of using an iframe with the URL is not an option because of the mixed-content safeguards (the pdfs are served via http). I think that a possible option is to download the pdfs from the url then display them in an iframe from the local file, but I cannot get this to work with tempfile() . A sample app: ui <- fluidPage( sidebarLayout( sidebarPanel( textInput("url", "add a url"),

Using Proxy Interface in Plotly/Shiny to dynamically change data

∥☆過路亽.° 提交于 2020-01-02 06:53:49
问题 I want to update the data present in a plot (displayed in plotlyOutput in a Shiny app) using Proxy Interface. Here is a minimal App.R code : library(shiny) library(plotly) ui <- fluidPage( actionButton("update", "Test"), plotlyOutput("graphe") ) server <- function(input, output, session) { output$graphe <- renderPlotly({ p <- plot_ly(type="scatter",mode="markers") p <- layout(p,title="test") p <- add_trace(p, x=0,y=0,name="ABC_test",mode="lines+markers") }) observeEvent(input$update, { proxy

Interaction between html widgets in R shiny

拜拜、爱过 提交于 2020-01-02 05:34:15
问题 I am developing an R shiny application that uses several html widgets, notably networkD3 , d3heatmap and chorddiag . These widgets work fine separately. However, using them in the same page leave a blank space where they are supposed to be. Here is a reproducible code that shows the bug. Comment plots line in the UI and you will see plots appearing and disappearing.. I thank you very much for your help! # libraries library(shiny) library(d3heatmap) library(chorddiag) library(networkD3) #

Disconnected from Server in shinyapps, but local's working

浪尽此生 提交于 2020-01-02 05:33:08
问题 I deployed my Shiny code to shinyapps.io successful. My data has little much rows (over 190,000), these data's can display in my local PC but shinyapps cannot with 'Disconnected from the server.' So I get Basic-plan and set memory size is xxxlarge and config some other settings. But my apps shut-down with 'Disconnected from the server.' continue.. How can I set my server setting? Please help me, and sorry my bad English. Here is server log and url https://tmap.shinyapps.io/break_map/ (RN

How to format R Shiny numericInput?

妖精的绣舞 提交于 2020-01-02 05:22:07
问题 I have a Shiny app with numerous numericInput fields. I would like a way to format the numericInput fields with commas separating every 10^3. For example, I want 5,000,000 instead of 5000000. I can do this in R with the format and prettyNum functions. But I don't have a way to do this in Shiny. This would be very helpful for the UI because it would work with percents, money, etc. Does anyone have any idea how to incorporate this into the numericInput field? Thanks! library(shiny) # Define UI

R shiny multiple selection with a scroll bar

戏子无情 提交于 2020-01-02 04:54:10
问题 I am using R shiny to develop a web application. Now I want to do multiple selection(not just one) from multiple choices. I tried checkboxGroupInput, but it will give a long list. What function can create things like this? Thanks! 回答1: You can use selectInput with the argument multiple = TRUE , as can be seen in the documentation. 来源: https://stackoverflow.com/questions/22723673/r-shiny-multiple-selection-with-a-scroll-bar