FAQ Database Discussion Community


Unable to appropriately assign a size to NVD3 chart

shiny,nvd3.js,rcharts,shinyapps
I am experimenting with an NVD3 chart, and though it renders correctly in shiny dashboard, the div which contains the chart overflows shiny dashboards box() container (does not fit snugly into the box). Explicitly setting height and width for the chart changes the charts size but not the containing div,...

Shiny - how to change the font size in select tags?

r,shiny,shinyapps
How can I change the font size in select tags? I tried with this code below but the font size does not change at all. shinyUI(fluidPage( sidebarPanel( # Change the font size. tags$style(type='text/css', "select {font-size: 32px !important} "), # Species/ pollutant options selectInput( inputId = "species", label = "Species:", choices...

Is there a way to center an R plot within a tabPanel in shiny?

r,shiny,shinyapps
I am working on a shiny app, and the way I have it formatted the plots are way too wide. I shortened them with the width argument so they look reasonable but I can't figure out how to center them within the tab panel (apparently plotOutput doesn't take an align...

R shiny ggplot2 error 'Results must be all atomic, or all data frames'

r,ggplot2,shiny,shinyapps
I get inconsistent errors with my shiny app and I can't seem to figure out what is wrong. This is the most common error. Error: Results must be all atomic, or all data frames. The shiny app basically allows the user to chose 1 or more files, then reads those...

Strange behavior of R Shiny reactiveValues() and invalidateLater()

r,shiny,shinyapps
I have a use case where am visualizing operational data for a dashboard. I would like it to be such that the visualization is updated periodically as data is added to the database. The logic in my mind is to first check if the number of rows in the live...

The error when publishing a shiny app

r,shiny,rstudio,shinyapps
I want to publish my shiny app. For this I created an account in https://www.shinyapps.io/ Then, in RStudio, I go to Tools->Shiny Apps->Publish Apps and paste the token, account and secret information. Finally, I get the error: Error: /v1/users/current/ 426 - shinyapps package out of date. To update visit: https://github.com/rstudio/shinyapps...

Shiny - submitButton and conditionalPanel [closed]

r,shiny,shinyapps
I have lots of conditional panels on my ul.R but they aren't working as before when the submit button is added - the UI is not updated automatically until the button is click (the conditional panel does not appear and disappear as expected before clicking submit), shinyUI(fluidPage( headerPanel("Citizen Sense PM...

R/ Shiny - How to get current year with Sys.Date()?

r,shiny,shinyapps
How can I get current year with Sys.Date()? I have this code below, selectInput( inputId = "year", label = "Year:", choices = c(2014:Sys.Date()) ) result, <select id="year"><option value="2014" selected>2014</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> <option value="2020">2020</option> .... <option...

Shiny “updateCheckboxGroupInput” inconsistency

shiny,shinyapps
I don't know if this is a bug of just a feature, but the updateCheckboxGroupInput function in Shiny is not working consistently. When I update the group with selected=FALSE to deselect all the choices, the related reactive components (observer, UI elements) doesn't change anything. I know that there are many...

R Shiny - how to share variables between Rendering functions?

r,shiny,shinyapps
I have variables that I get from ui.R and I want to use them in renderUI and renderPlot functions such as below, shinyServer( function(input, output, session) { output$text <- renderUI({ # Sites. site1 = input$site1 site2 = input$site2 site3 = input$site3 site4 = input$site4 }) output$plot = renderPlot({ # Sites....

How to set ggvis to use canvas renderer by default?

r,shiny,ggvis,shinyapps
Is it possible to make a ggvis widget use the canvas renderer by default (instead of svg)?

Creating a generic function generating new objects from selected list of columns in a data frame

r,function,user-interface,shiny,shinyapps
I'm working on a simple ShinyApp that would enable end-users to interrogate the data with use of various filters. Some of the filters correspond to unique values in data frame columns which are created using the code corresponding to the example below: # Source sample data data(mtcars) # Put together...

Shiny - change the size (padding?) of dropdown menu (select tags) smaller

html,css,r,shiny,shinyapps
How can I change the size of dropdown menu (select tags) smaller? I thought it is the padding that makes the dropdown looking 'thick'. So I change the padding to 0 to make it 'thin' and obviously that does not work, shinyUI(fluidPage( sidebarPanel( # Change the font size. tags$style(type='text/css', "...

Shiny - years input only?

r,shiny,shinyapps
How can I have year input only? I have this date input below which gives me dates from 2014-10-01, dateInput( inputId = "date_from", label = "Select time period:", value = "2014-10-01", format = "dd-mm-yyyy" ) But I don't need the months and dates, only years that I need, dateInput( inputId...

Save changes to sqlite db via shiny

sqlite,shiny,shinyapps
Is it possible to run a Shiny app that connects to a sqlite database, and that can make changes and save to that database? My question is similar to this questions - R script do not write in sqlite db if I run the script in shiny but there was...