Shiny

Is there any way for an actionButton() to navigate to another tab within a R Shiny application?

送分小仙女□ 提交于 2020-01-14 14:28:07
问题 I have multiple tabs within my R Shiny app and haven't discovered a way to have my action button navigate to another tab. The first tab ends with a "submit info" action button, and the goal is to have the "results" tab open after the user submits. If anyone might have some pseudo code that could make this happen, anything would be extremely helpful. 回答1: Hi you can use updateTabsetPanel to do that, you have to put an id to your tabsetPanel (if you use a tabsetPanel ) and add session to your

Is there any way for an actionButton() to navigate to another tab within a R Shiny application?

老子叫甜甜 提交于 2020-01-14 14:27:08
问题 I have multiple tabs within my R Shiny app and haven't discovered a way to have my action button navigate to another tab. The first tab ends with a "submit info" action button, and the goal is to have the "results" tab open after the user submits. If anyone might have some pseudo code that could make this happen, anything would be extremely helpful. 回答1: Hi you can use updateTabsetPanel to do that, you have to put an id to your tabsetPanel (if you use a tabsetPanel ) and add session to your

Action button and observeEvent

孤者浪人 提交于 2020-01-14 14:15:17
问题 I want an button to triggers an action on a prespecified non-reactive variable x . Each time the button is hit x <- x + 1 shall be executed. To check if it was done correctly the result shall be displayed. To achieve this I tried observeEvent() . But it is doing what it should only once. How does it work properly? It seems that rv is only available within the observeEvent() function. If output$text_2 <- renderText({ rv$a }) is placed outside of observeEvent() an error occurs. How can I use

R DT datatable not retaining row index/counter column after selecting new page when using callback option

只愿长相守 提交于 2020-01-14 13:34:29
问题 I am using this question as a reference to add a "row index" or "counter column" (as described in the datatable documentation here) to a DT::datatable in a Shiny application. The intent is to hold the row names in the table constant (1, 2, 3...) regardless of the sorting that is applied to the table. The user NicE answered this question by converting the javascript code in the datatable documentation for use in the callback of the DT::datatable options: output$tbl = renderDataTable({

Hide shiny output

浪子不回头ぞ 提交于 2020-01-14 13:28:11
问题 How do you hide rendered shiny output? Specifically, I have some figures/tables generated by shiny and I have a button, that when clicked should hide the figures/tables, and when clicked again should show them. This is what I have so far (below), and it works somewhat, but where it's supposed to hide the renderPlot output, there is a big blank space in the document that I am trying to make go away. It should be possible to just copy and paste this code into Rstudio and hit run document (it's

LaTeX PDF with images from web in shinyapp

爱⌒轻易说出口 提交于 2020-01-14 08:22:28
问题 I used to be able to include images from URLs in PDF reports generated from shiny apps doing ![](url.com) . A few markdown versions later I get the following error: ! Unable to load picture or PDF file https://i0.wp.com/wptavern.com/wp-content/uploads/2016/07/stack-overflow.png?ssl=1 for the same code. Adding pandoc_args: ["--extract-media", "."] to the YAML downloads the imaged file locally but only works in local r-markdown files. How does shinyapp store local files and how to get the

How to redirect to a dynamic URL in shiny?

无人久伴 提交于 2020-01-14 05:44:10
问题 in a shinty application, I'd like to redirect the user to another URL when she is clicking on a point in a plot. The redirect itself is working based on the solution presented in https://stackoverflow.com/a/47158654/590437, however, it's unclear to me how to incorporate a dynamic property(which is calculated on the server-side) into the URL. Example: library(shiny) library(ggplot2) jscode <- "Shiny.addCustomMessageHandler('mymessage', function(message) {window.location = 'http://www.google

r - input value by user to dataframe via shiny

岁酱吖の 提交于 2020-01-14 05:16:06
问题 I'm building an app that allows user to pass the value from selectizeInput or checkboxInput to form a dataframe. I've searched a while and found these sources that similar to what I expect: handsontable It is from here: https://github.com/jrowen/rhandsontable. Mine is quite similar to this exampe: shiny::runGitHub("jrowen/rhandsontable", subdir = "inst/examples/rhandsontable_portfolio") But I want to use shiny widgets to pass values to the dataframe. It should be able to add/remove rows as

shiny Change data input of buttons

左心房为你撑大大i 提交于 2020-01-14 04:36:55
问题 I have a form with an active button, the problem is that I want reset the button in this form output$exampleFasta = 0 but it throw a exception, how can I change the data of variable? or if exist something like renderImage that can give info to specific attribute like the id. index.html <form class="span12 menu-med-upload"> <div class="row-fluid"> <h3>Upload File .fasta</h3> <div class="custom-input-file btn btn-inverse"> <input type="file" size="1" name="fileFasta" id="fileFasta" class="input

Shiny Bookmarking is not Working If I Changed the Formatting of Numeric Input

一笑奈何 提交于 2020-01-14 04:08:28
问题 I want to design an app using Shiny that allows users to bookmark the input values. However, I found that if I changed the input format of the numericInput , bookmarking will not work. Based on this link (https://beta.rstudioconnect.com/barbara/format-numbers/) to format the input of a numericInput . I created a js file called number_format.js and stored the file in the directory www . The code is as follows. $(document).ready(function() { // Helper function to guarantee cross-browser