Shiny

Update deckgl map in R shiny when clicked on bar

主宰稳场 提交于 2021-02-10 07:38:05
问题 Trying to make a shiny app with these properties. Default view is aggregate layer. There will be number of columns/bars. On click of a column, the view is updated to show the non-aggregated version of data. It is something like to know which bar is getting clicked and filtering the data with respect to it. I have written the below code, which does the aggregate layer. However not sure how to get the "clicked_on_this_bar" details. Here if we get, user clicked on bar of "Area A", then we can

How do I remove a selection made using Shiny and mapedit by clicking again on the feature?

独自空忆成欢 提交于 2021-02-10 06:57:43
问题 Using Shiny, leaflet, and mapedit packages I can generate a graph with multiple series using the code below. Intuitively I would like to click on a selected map icon a second time and the associated data is removed from the graph. Essentially the click event can be toggled on or off. Does anyone have any suggestions? # devtools::install_github("r-spatial/sf") # devtools::install_github("r-spatial/mapview@develop") # devtools::install_github("bhaskarvk/leaflet.extras") # devtools::install

how can I eliminate placeholder white space from shiny apps?

佐手、 提交于 2021-02-10 05:42:58
问题 When making shiny apps I often struggle with how to arrange plots and text outputs on the page for the user. So, I like to try an make it possible for a user to select which output to display. For instance, the user may be able to display 3 graphs and 2 chunks of text but may only want to display the first graph and one chunk of text. I can usually accomplish this using if statements inside of render functions. But, I have found shiny will still add white space even if...the user does not

Uploaded audio files does not play in r shiny

♀尐吖头ヾ 提交于 2021-02-10 05:41:25
问题 I have developed an app which takes an .wav file as input and plays it. However it seems to be not working. On the other hand, if the audio file is placed in /www folder and path name is given, it is playing fine. What am I doing wrong ? app.R library( shinydashboard ) ui = source( file.path( "ui", "ui.R" ), local = T )$value #..... ui for ocr server = function( input, output, session ){ #..... Include server logic for each tab ..... source( file.path( "server", "server.R" ), local = T )

How to use {gtsummary} package in r shiny app

纵然是瞬间 提交于 2021-02-10 02:29:51
问题 Is it possible to render a table with {gtsummary} in a shiny app? library(gtsummary) # make dataset with a few variables to summarize iris2 <- iris %>% select(Sepal.Length, Sepal.Width, Species) # summarize the data with our package table1 <- tbl_summary(iris2) table1 in a Shiny app: -> shinyApp( ui = fluidPage( fluidRow( column(12, tableOutput('table') ) ) ), server = function(input, output) { output$table <- renderTable(table1) }) Thank you. 回答1: Maybe this what you are looking for. To

remove mapedit features programmatically

依然范特西╮ 提交于 2021-02-08 20:33:39
问题 With mapedit it is possible to clear drawn features using the 'trash' icon built into the drawbar UI. It is also possible to clear features associated with the leaflet map using clearMarkers() and leafletProxy() , as laid out in this issue. However, leafletProxy does not clear any features drawn by the user. How do I programmatically clear these features? (e.g. after clicking an actionButton). Here is a simple shiny app and more explanation: library(mapedit) library(mapview) library(shiny) ui

remove mapedit features programmatically

喜你入骨 提交于 2021-02-08 20:29:31
问题 With mapedit it is possible to clear drawn features using the 'trash' icon built into the drawbar UI. It is also possible to clear features associated with the leaflet map using clearMarkers() and leafletProxy() , as laid out in this issue. However, leafletProxy does not clear any features drawn by the user. How do I programmatically clear these features? (e.g. after clicking an actionButton). Here is a simple shiny app and more explanation: library(mapedit) library(mapview) library(shiny) ui

R Shiny: How can I make multiple elements reactive in add/remove button context?

元气小坏坏 提交于 2021-02-08 15:19:28
问题 I am creating a shiny app such that when I click on add or remove button, multiple reactive elements are affected. I have simplified significantly what I am trying to do below. Basically, we get selectInput() and textInput() boxes side-by-side, such that the textInput() box is populated with the user-chosen result of selectInput() box. I then have an add button and remove button, such that by clicking the add button, on the next line down, we get new selectInput() and textInput() boxes side

R Shiny Async with Progress Bar

纵然是瞬间 提交于 2021-02-08 15:19:04
问题 Async processing in Shiny is supposed to take a long-running function and give control back to the user. However, it would still be nice to let the user know that the computation is running in the background. I cannot figure out how to structure the async process to run in the background and still display a progress indicator. Below is the example code I've been fiddling with. I think the progress indicator is one issue, but also the creation of the table doesn't seem to be working with async

R Shiny Async with Progress Bar

时光毁灭记忆、已成空白 提交于 2021-02-08 15:18:25
问题 Async processing in Shiny is supposed to take a long-running function and give control back to the user. However, it would still be nice to let the user know that the computation is running in the background. I cannot figure out how to structure the async process to run in the background and still display a progress indicator. Below is the example code I've been fiddling with. I think the progress indicator is one issue, but also the creation of the table doesn't seem to be working with async