Shiny

Reactive Filtering Based on User Login - Shinyauthr

家住魔仙堡 提交于 2021-01-29 14:47:41
问题 I have a QA Shiny Dashboard app that has a master dataset that must filter the rows used in subsequent tables / maps according to user login details. For example: if the user logs in with a particular username (location@email.com) then the reactive function selects rows that contain this username and passes these to the shiny app for rendering. Example of basic premise: username <- "location@email.com" new_dataset <- filter(dataset, column %like% username output$table <- renderTable ({ new

Control the size of popupGraph() from leaflet in r shiny

早过忘川 提交于 2021-01-29 13:53:21
问题 I am having trouble setting my plot width to more than 300px in my popup of my leafletoutput. The height can be set to whatever value, it will work, but it seems like the width is capped to 300px (the extra width will provide a greyed background). Here's the example : library(tidyverse) library(ggplot2) library(shiny) library(leaflet) library(leafpop) id <- c(1,1,1,1,2,2,3,3,3,4) lat <- c(49.823, 49.823, 49.823, 49.823, 58.478, 58.478, 57.478 , 57.478 , 57.478, 38.551) lng <- c(-10.854, -10

Active tab to select radio button in Shiny

余生长醉 提交于 2021-01-29 13:37:42
问题 I have the following Shiny app code where the user can select radio buttons and then the corresponding tab panel is activated. The question I have is how to do the reverse i.e. if the user selects a tab panel, how do you activate the corresponding radio button. A reproducible example is below. If you select Tab 2 radio button for example, Tab 2 is activated If you then select Tab 3, then Tab 2 radio button remains selected and I would like it to update to Tab 3 radio button Thanks library

How do I create a Leaflet Proxy in observeEvent() for checkboxGroup in R Shiny

人盡茶涼 提交于 2021-01-29 13:31:04
问题 I'm a bit new to R Shiny, and I'm trying to make a simple, dynamic web map in which common users can find where to recycle a variety of materials in Eastern Kentucky. In my sidebar panel in the UI, I made a checkboxGroup, so the user can filter through the recycling centers that allows for the recycling of the materials of their choosing (in this case, which centers recycle glass AND/OR aluminum AND/OR plastics). The checkbox shows up when you run the app, but I get a blank dashboard where

Shiny app Error chartSeries requires an xtsible object?

≯℡__Kan透↙ 提交于 2021-01-29 13:03:16
问题 I have following basic code with shiny: library(quantmod); library(shiny); ui <- fluidPage( textInput("Symbol","Assign_Symbol","GOOG"), dateRangeInput("Date","Assing_Date", start = Sys.Date() - 20, end = Sys.Date()), plotOutput("Chart") ) server <- function(input, output) { envSymbol <- new.env() Sym <- "Sym" envSymbol[[Sym]] <- reactive({ as.xts(getSymbols(input$Symbol, auto.assign = FALSE)) }) output$Chart <- renderPlot({ chartSeries( envSymbol[[Sym]], theme = chartTheme("white"), type =

Secondary axis in ploty for R and Shiny

戏子无情 提交于 2021-01-29 13:00:38
问题 EDIT: Regarding my question 2, it seems it is a bug and hasn't been fixed yet as it is not their top priority at the moment. Someone asked to try katex instead of latex, but not sure how that works https://github.com/plotly/plotly.js/issues/559 I have attached an output for a code- https://i.stack.imgur.com/u65if.jpg. I am trying to plot two y axis and a common x axis using plotly. The issues I am facing are: I would like the primary and the secondary y axis ticks to share the same gridline.

Replacing initial Dataframe from an editable DataTable and using that new data frame in another table

你。 提交于 2021-01-29 12:32:15
问题 I have a nested DataTable in my Shiny app. Some of the columns in the child table are editable by the user. The goal here is to have the user edit the values and then the data frame would be replaced with those new values. Then I would like to take that replaced data frame and use it for another table. I need to use the edited values for calculations in the other table. workflow : create nested data table -> user edits values -> initial data is replaced by new data -> use the new data for

Choose a datatable row either by clicking, actionButton() or shiny widget

怎甘沉沦 提交于 2021-01-29 12:30:35
问题 I have the shiny app below in which the user is able to choose a row to display its index with 3 ways. Click on the row and display its index Click on a row then press Next and display the index of the next row. Select the rowname of a row,press Assign and display its index. I know that I can use callback in order to enable datatable to achieve this but I do not know how to combine many callbacks . library(shiny) library(DT) dat <- mtcars callback <- JS( "Shiny.addCustomMessageHandler(", "

Secondary axis in ploty for R and Shiny

烂漫一生 提交于 2021-01-29 12:07:24
问题 EDIT: Regarding my question 2, it seems it is a bug and hasn't been fixed yet as it is not their top priority at the moment. Someone asked to try katex instead of latex, but not sure how that works https://github.com/plotly/plotly.js/issues/559 I have attached an output for a code- https://i.stack.imgur.com/u65if.jpg. I am trying to plot two y axis and a common x axis using plotly. The issues I am facing are: I would like the primary and the secondary y axis ticks to share the same gridline.

Adding custom ActionButtons to popups in leaflet map within shiny app

若如初见. 提交于 2021-01-29 10:49:57
问题 I'm trying to build an app in R shiny where users can learn details about points on a map. When users click on a point, a popup shows some initial details and then an ActionButton (or ActionLink). When the user clicks on that ActionButton, ObserveEvent reactive launches a modal dialog displaying more information about that point. I have the maps, action buttons, and modal dialogs in place. However, I can't figure out how to "assign" each ActionButton to its point/popup on the map. Is there a