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
36
votes
2 answers

Make conditionalPanel depend on files uploaded with fileInput

So I'm trying to make a shiny app where I have a button which only shows up if files have been uploaded; for this im using conditionalPanel. ui.R: require(shiny) shinyUI(pageWithSidebar( headerPanel("My App"), sidebarPanel( …
ClaytonJY
  • 1,244
  • 10
  • 21
35
votes
1 answer

suppressing sorting in dataTables in Shiny

I have a dataTable in Shiny but I want to disable sorting and get rid of the arrows next to the column headings as exemplified in the following image. I have used the following code to attempt to disble it with no luck. output$ex <- …
mike
  • 881
  • 2
  • 10
  • 23
35
votes
3 answers

Get the size of the window in Shiny

I Would like to determine the size of the browser window in Shiny to help me layout my plot divs better. Specifically I would like to determine the aspect ratio of the window to see how many divs I should spread across the screen and it still look…
Justace Clutter
  • 2,097
  • 3
  • 18
  • 31
35
votes
1 answer

Clickable links in Shiny Datatable

I created a table containing some HTML links using Shiny's renderDataTable. The links are not clickable, though, instead they render literally: https://samizdat.shinyapps.io/zakazky/ Do you have any idea what could be wrong? It worked fine before…
Petr Kočí
  • 361
  • 1
  • 3
  • 3
35
votes
4 answers

How can I insert an image into the navbar on a shiny navbarPage()

I am builidng a shiny application using a navbarPage() layout. I would like to insert an image to be on the right hand side of the screen, in the navigation bar. It would look like the navigation bar at the top of, for instance, the stackoverflow…
John Paul
  • 12,196
  • 6
  • 55
  • 75
34
votes
2 answers

How to split Shiny app code over multiple files in RStudio?

I tried to split code for a shiny application over different files, but can't get this to work decently in Shiny. My attempt can be found in this demo How can I split up my code over different files, but still keep the 'Run App button ' and have…
Magdy
  • 345
  • 1
  • 3
  • 9
34
votes
4 answers

How to listen for more than one event expression within a Shiny observeEvent

I want two different events to trigger an observer. It was suggested here that this should work. But it seems that it depends only on the second event. observeEvent({ input$spec_button mainplot.click$click }, { ... } ) Have a look at the…
Kipras Kančys
  • 1,617
  • 1
  • 15
  • 20
34
votes
4 answers

Favicon in Shiny

I wanted to add a favicon to my WebApp I'm using this line, but it doesn't work: HTML("") inside the ui.R script and outside the shinyUI() function. Also I have the image.png where the…
Geiser
  • 1,054
  • 1
  • 12
  • 28
34
votes
2 answers

How to get vector of options from server.R to ui.R for selectInput in Shiny R App

My ui.R file has a selectInput like this: selectInput("variable1", "Choose Option:", camps) where camps is supposed to be a vector of options. This vector depends on a sql query that runs on the server script and returns the IDs of the camps:…
Cybernetic
  • 12,628
  • 16
  • 93
  • 132
34
votes
3 answers

dynamically add plots to web page using shiny

i want to create an app using shiny that dynamically add plots to the page. it could be 10 plots and it could be only one. i'm using this tutorial in the shiny homepage for dynamic UI. this is a simplified example. the function showme is ploting…
haki
  • 9,389
  • 15
  • 62
  • 110
33
votes
2 answers

R Shiny REST API communication

I have a shiny app that takes a JSON input file, runs it through a classifier and returns a classified JSON object. I want the app to be able to communicate with an API. I want the API to post a file to the Shiny App which will do its work and…
user2987739
  • 713
  • 2
  • 7
  • 9
33
votes
2 answers

Display HTML file in Shiny App

Is it possible to display a html file in Shiny app (in main panel)? This HTML is created by a SAS code but I want to display in Shiny App. This is not a small image. This is tabular output in HTML file. Html file contains tabele as given…
Piyush
  • 1,571
  • 4
  • 14
  • 21
32
votes
1 answer

shiny fluidrow column white space

I have a top banner that I want to split into two separate sections representing two different inputs. To do this, I've created a fluidRow and with two columns, one for each input. However, as it is now there is a little bit of white space between…
Peter
  • 395
  • 1
  • 3
  • 7
32
votes
2 answers

How to display widgets inline in shiny

I have the below code to display the widgets inline(in same row) in shiny div(style="display:inline-block; width: 150px;height: 75px;",selectInput("ddllgra", "Function:",c('mean','median','sd','count','min','max'),…
vanathaiyan
  • 935
  • 1
  • 10
  • 19
32
votes
1 answer

cannot coerce type 'closure' to vector of type 'character'

I am trying to build an interactive scatter-plot using shiny. Using the iris data, I would like to have a user select the x and y dimensions of a scatter plot *petal vs sepal) and then output a simple scatter plot of the selected dimensions. …
Jeremy Pastore
  • 323
  • 1
  • 3
  • 5