Questions tagged [shiny]

Shiny is an R package that makes it easy to build interactive web applications using only R. For the Python Shiny package, use the tag [py-shiny] instead.

Shiny makes it easy for R developers to turn their analyses into interactive web applications that anyone can use, without requiring any prior HTML, CSS or JavaScript knowledge. It enables the developer to let users choose input parameters using user friendly controls like sliders, drop-down menus, and text fields, which will then influence any number of outputs like plots, tables, and summaries.

Repositories

Other resources

Free books on Shiny:

Related tags

28422 questions
50
votes
2 answers

R Shiny - add tabPanel to tabsetPanel dynamically (with the use of renderUI)

I am developing a shiny application in which I use tabsetPanel, which is generated when user enters some particular input. Thus, I want to use renderUI function to make a tabsetPanel appear / disappear. My struggle now is that number of tabPanel…
Marta Karas
  • 4,967
  • 10
  • 47
  • 77
48
votes
5 answers

how to insert new line in R shiny string

In shiny, I have the following: output$sequenceText <- renderText({ showSequence() }) showSequence <- reactive({ selectedSeqs <- as.numeric(input$sequenceSelect) resultString <- "" currentString <-"" for(i in selectedSeqs){ …
user1357015
  • 11,168
  • 22
  • 66
  • 111
47
votes
3 answers

Possible to show console messages (written with `message`) in a shiny ui?

I don't understand R's message vs cat vs print vs etc. too deeply, but I'm wondering if it's possible to capture messages and show them in a shiny app? Example: the following app can capture cat statements (and print statements as well) but not…
DeanAttali
  • 25,268
  • 10
  • 92
  • 118
47
votes
4 answers

'Reset inputs' button in shiny app

I would like to implement a 'Reset inputs' button in my shiny app. Here is an example with just two inputs where I'm using the update functions to set the values back to the default values: library(shiny) runApp(list( ui = pageWithSidebar( …
Insa
  • 688
  • 1
  • 7
  • 9
47
votes
8 answers

Force no default selection in selectInput()

The Shiny documentation mentions that for selectInput(): selected The value (or, if none was supplied, the title) of the navigation item that should be selected by default. If NULL, the first navigation will be selected. What if by default I…
Piyush
  • 1,571
  • 4
  • 14
  • 21
46
votes
4 answers

dplyr - groupby on multiple columns using variable names

I am working with R Shiny for some exploratory data analysis. I have two checkbox inputs that contain only the user-selected options. The first checkbox input contains only the categorical variables; the second checkbox contains only numeric…
Neil
  • 7,937
  • 22
  • 87
  • 145
46
votes
4 answers

How to make the horizontal scrollbar visible in DT::datatable

Using R shiny & DT package, I am creating certain tables. The number of columns vary as per user input & is not fixed. I have included the following code snippet to include a horizontal scrollbar so that when the number of columns is large, the user…
Komal Rathi
  • 4,164
  • 13
  • 60
  • 98
45
votes
4 answers

Effectively debugging Shiny apps

I have a complex Shiny app spread across multiple files that uses code from several packages. The app works when run locally in R Studio, but on my server it throws a generic error: Error: do not know how to convert 'x' to class "Date" This is…
sdgfsdh
  • 33,689
  • 26
  • 132
  • 245
45
votes
1 answer

Add link to R Shiny Application so link opens in a new browser tab

I am creating my first Shiny Application in R. I am using shiny to display bivariate results from a survey I conducted. From a pair of input boxes users can choose variables from the survey, and various statistics are generated (tables, plots, etc.)…
Chris
  • 3,401
  • 5
  • 33
  • 42
44
votes
2 answers

selectInput that is dependent on another selectInput

I have some data below that I'm using to create a donut chart in R shiny, where date is a character. I want to be able to select the email whose score I want to view, but then in the second dropdown selection only see the dates for which that email…
Hillary
  • 785
  • 1
  • 6
  • 17
44
votes
4 answers

How do you pass parameters to a shiny app via URL

In web browsers you pass parameters to a website like www.mysite.com/?parameter=1 I have a shiny app and I would like to use the parameter passed in to the site in calculations as an input. So is it possible to do something like…
user3022875
  • 8,598
  • 26
  • 103
  • 167
43
votes
2 answers

Are there global variables in R Shiny?

How do you declare global variables in with R Shiny so that you do not need to run the same pieces of code multiple times? As a very simple example I have 2 plots that use the same exact data but I only want to calculate the data ONCE. Here is the…
user3022875
  • 8,598
  • 26
  • 103
  • 167
42
votes
2 answers

RMarkdown in Shiny Application

Problem Is there a way to insert (and evaluate) an RMarkdown script in a shiny application. (Note, I am not looking for a shiny application in RMarkdown that is explained here, nor am I looking for Markdown scripts in shiny (see Shiny Gallery…
David
  • 9,216
  • 4
  • 45
  • 78
41
votes
1 answer

R shiny: How to get an reactive data frame updated each time pressing an actionButton without creating a new reactive data frame?

My shiny app allows user to upload a csv by using fileInput and stored as an reactive object df_data. I then created a numericInput for user to enter a row number to delete from the data frame. However, I got an error about evaluation nested too…
Lawrence Lee
  • 668
  • 1
  • 7
  • 8
41
votes
4 answers

Binding javascript (d3.js) to shiny

First, I am fairly unfamiliar with javascript and its library d3.js, but I am familiar with R. Creating dashboards using Shiny has been fun and easy (thanks to stackoverflow). Now I want to expand it by connect d3 elements to it. I'm looking for…
Sweetbabyjesus
  • 563
  • 1
  • 4
  • 11