Shiny

How do I reference a clicked point on a ggvis plot in Shiny

帅比萌擦擦* 提交于 2020-01-13 06:53:10
问题 I wish to use the values of a clicked point for further processing but am unclear how to reference the data library(shiny) library(ggvis) library(dplyr) df <- data.frame(a=c(1,2),b=c(5,3)) runApp(list( ui = bootstrapPage( ggvisOutput("plot") ), server = function(..., session) { # function to handle click getData = function(data,location,session){ if(is.null(data)) return(NULL) # This returns values to console print(glimpse(data)) # Observations: 1 # Variables: # $ a (int) 2 # $ b (int) 3 } #

Can Shiny recognise text selection with mouse (highlighted text)?

拈花ヽ惹草 提交于 2020-01-13 06:13:51
问题 I need the user to assign text fragments to categories or "codes" in Shiny. Basically, I would like the user to highlight a text from an output (in the example below, from a table or text output), then press a button ( code ) and assign the selected text to an object within the app. In the app below, the selected text should be rendered as output$selected_text . I would appreciate any suggestions on how to achieve this, I suspect JavaScript would be helpful. library(shiny) text1 <- "Lorem

Can Shiny recognise text selection with mouse (highlighted text)?

三世轮回 提交于 2020-01-13 06:13:32
问题 I need the user to assign text fragments to categories or "codes" in Shiny. Basically, I would like the user to highlight a text from an output (in the example below, from a table or text output), then press a button ( code ) and assign the selected text to an object within the app. In the app below, the selected text should be rendered as output$selected_text . I would appreciate any suggestions on how to achieve this, I suspect JavaScript would be helpful. library(shiny) text1 <- "Lorem

Create a table with clickable hyperlink

谁说胖子不能爱 提交于 2020-01-13 06:11:42
问题 I have an R data frame, which is displayed on RShiny output called by renderDataTable. However, I am unable to implement a simple Java or html tags that helps me to do the following. Example: (I am inserting the server.ui code, considering that these parameters are to be set at server.ui end. ) For simplification representing only 2 rows. mydataframe Col1 Col2 Col3 Google 5 lines description www.google.com Yahoo 5 lines description www.yahoo.com Goal is to rederDataTable output on shiny so

ShinyApp - Dropbox authentication with rdrop2

三世轮回 提交于 2020-01-13 06:02:10
问题 I stored files on my dropbox and I am accessing them through rdrop2 on a shinyapp hosted at shinyapps.io. The following code works great on my laptop but aborts when I deploy my app on shinyapp.io and freezes an opaque screen. Any clues on why and how to troubleshoot? Thanks a bunch! - stephane Here is the code I am using (from https://github.com/karthik/rdrop2): token<-drop_auth() saveRDS(token, "droptoken.rds") token <- readRDS("droptoken.rds") ZIPFile<-drop_read_csv(as.character(ZIPCode)

R / d3heatmap / shiny - is there a way to embed images in d3 tooltip?

て烟熏妆下的殇ゞ 提交于 2020-01-13 05:29:25
问题 I'd like to embed images (rather than the default Row - Column - Value data) in the d3 tooltip when scrolling over a cell. library(shiny) library(d3heatmap) ui <- shinyUI(fluidPage( titlePanel("Old Faithful Geyser Data"), mainPanel( d3heatmapOutput("out") ) ) ) server <- shinyServer(function(input, output) { output$out <- renderD3heatmap({ d3heatmap(x = mtcars, Colv = NULL, scale= "column", key = FALSE, yaxis_font_size = "10pt", xaxis_font_size = "10pt") }) }) shinyApp(ui = ui, server =

Unable to pass user inputs into R shiny modules

霸气de小男生 提交于 2020-01-13 05:01:33
问题 I am working on a shiny app where on load it shows a default table. Have a user input which when I enter and click on run should update the table. And also when clicked on reset it should show the default table.As of now I am able to view the default table and nothing happens when I click on the run button. optimzation <- function(input, output, session, data,budget,run,reset) { v <- reactiveValues(data = data) observeEvent(run, { v$data <- data %>% mutate(carb = mpg * budget) }) observeEvent

How to Integrate a data-driven d3JS graph with Shiny?

前提是你 提交于 2020-01-13 04:27:16
问题 Yesterday I asked how to bring a d3js javacript file with self-contained data into Shiny to draw a force network graph. Now I am looking for the next step: server.R will read a JSON data file for display in the graph. I've been trying to adapt this example that uses messageHandlers to pass the data into the d3JS. This is beyond my expertise so I am looking for some help. I'm pretty sure it is in the messageHandler where things go awry. I will gladly publish the full working example because

In Shiny, update DataTable with new values from user input

僤鯓⒐⒋嵵緔 提交于 2020-01-13 03:56:26
问题 I'm writing a shiny app that has a table (using DT::renderDataTable ) from which users can select a row. But I want the user to also be able to add new row(s) if what they want is not already in the table. I'm using input controls for the user to enter new data, and I have an action button which, if pressed, should create a new row of data in the table from the input values. But pressing the button does not update the table. A minimal example: library(shiny) library(DT) mydata = data.frame(id

Adjust size of Shiny progress bar and center it

假如想象 提交于 2020-01-13 03:45:06
问题 I'm working with a Shiny app where I need to calculate processes and while the calc progress is executing, I'm using a progressBar to show the process. The problem is that the progress bar is too small, and I don't like the way is shown. So, I was thinking that maybe there's a way to implement a progress bar using a Shiny modal (there's a function called modalDialog ). My idea is that when the user runs the calc, a modal will be opened showing a progressBar . This is the progress code: