FAQ Database Discussion Community


Shiny conditional navlist

r,shiny
Using R and Shiny, I am using the answer to this question as the basis of my code but will act as a good minimal reproducible example. But I would like my shiny app that uses a navlistPanel to change to the next tabPanel after the done button has been...

[r][shiny] how to render ui from a string?

r,shiny
I have ui component stored in the data frame or vector as character. chr <- "fluidRow( numericInput(inputId='a'), numericInput(inputId='b') ) " I want to render the character as shiny ui. I tried: server.r shinyServer(function(input, output, session) { output$ui <- renderUI({ eval(parse(text=chr)) }) }) ui.r shinyUI(fluidPage( uiOutput("ui") ) ) ...

Shiny error is.na() applied to non-(list or vector) of type 'NULL'

r,shiny
I have a problem with my shiny app. I try to make second selectInput (model) to be dependent from choice made in first selectInput (marka) but it still not working. I found this topic Using the input from updateSelectInput and it works on my computer so i did exactly the...

how to display an image to the left of the text in a titlePanel?

shiny
I would like to have an image displayed to the left of the titlePanel text. I have tried: ... titlePanel( img(src = "./mylogo.png", height = 60, width = 255), "My Title" ), ... The image gets displayed, however, the text 'My Title' does not get displayed. How can I do...

R Shiny list2env

r,shiny
I have a shiny application in which the server.R looks like below : shinyServer(function(input, output,session) { temp<-reactive({ obj1<-read.csv(.....) v1<-c("obj2") lst<-lapply(v1,read.csv(....) list2env(lst) ... }) I'm creating an object directly in the reactive function called obj1 and also creating obj2 using list2env. Both obj1 and obj2 are not in the same environment....

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

r,datatables,scrollbar,shiny,horizontal-scrolling
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 can scroll through...

Error in UseMethod(“xtable”)

r,shiny
I am trying to load multiple files and merge using Reduce function... Tried with several options but got same error Got 'xtable' applied to an object of class "character" server.R library(shiny) shinyServer(function(input,output) { output$data <- renderUI({ res <- lapply( 1:input$fnos, function(i) { fileInput(paste("file", i), "Load File", accept=c( 'text/csv', 'text/comma-separated-values', 'text/tab-separated-values',...

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 - custom warning/error messages?

r,shiny
How can I print a custom warning/ error message when the required data is empty? for instance, in my server.R, I have this code below, output$plot = renderPlot({ # Sites. site1 = input$site1 # Prepare SQL query. query <- "SELECT * FROM datatable WHERE sites.id = 'SITE1' " # Match...

How do I select all, when the last selection is deselected in R / Shiny?

r,shiny
How do I select all, when the last selection in a checkboxGroupInput is deselected? I have tried: if (input$checkboxGroupInput == NULL){ updateCheckboxGroupInput(session, inputId = "checkboxGroupInput", choices = year, selected = year, inline = TRUE) } But it returns: "Warning: Unhandled error in observer: argument is of length zero"...

How to build a 'for' loop with input$i in R Shiny

r,loops,for-loop,shiny
In my shiny app, I build a a number of checkboxes using a for loop, like this: landelist <- c("Danmark", "Tjekkiet", "Østrig", "Belgien", "Tyskland", "Sverige", "USA", "Norge", "Island") landecheckbox <- c() for (land in landelist){ landechek <- paste0("<label class=\"checkbox inline\"><input id=\"", land, "\" type=\"checkbox\" checked><span>", land, "</span></label>") landecheckbox <- c(landechek,...

Convert a column of text URLs into active hyperlinks in Shiny

r,url,hyperlink,datatables,shiny
I am creating a user interface for a pathway enrichment program. The results are shown in a table as shown below. Below is a snippet showing that I am using DT::renderDataTable and DT::datatable to output the table in a tab. spia_out() is just a reactive function that runs the pathway...

Dynamic UI & Accessing Data (Shiny)

r,dynamic,shiny
I've a problem with my shiny code which is somewhat related with the two questions I linked below. So i've made a dynamic UI : output$hmgroupsmean <-renderUI({ numGroups <- as.integer(input$HMgroups) lapply(1:numGroups, function(i) { numericInput(paste0("group_", i), label= paste("Mean", i), min=0, max=1000, value= 10) }) }) that display N numericInput depending on...

how to set Shiny::toJSON args from custom update***Input function?

r,shiny,inputbinding
I am developing a custom input binding for Shiny. I have a data.table that I am passing to a javascript. Unfortunately, the data needs to be encoded row-wise rather than column-wise. private$inputMessageQueue is processsed without extra arguments so there is no place to overrideshiny::toJSON default args. How can I get...

Deploying R shiny app using leaflet

r,shiny,leaflet
I would like to create a shiny map using leaflet which I can publish online do that others without R can view and interact with it. I can create a shiny app using leaflet, but when I use the 'publish' button in the popup window I get an error saying...

Manage paths in R Shiny?

r,shiny,web-deployment
I need some advice on how to take a working app from your local machine onto a web deployment. I tried deploying an App to Shinyserver.io, but I have path errors. It cannot find my utilities code in utils-fun.R. Error message The application failed to start. Error in eval(expr, envir,...

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...

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...

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...

using dygraph with shiny

r,shiny,dygraphs
I recently started using dygraph and I quite enjoyed it so far. I have tried to use it then with shiny without much success. Although my script doesn't yield any errors, it also doesn't produce any graph! Any chance you could guide me in the right direction? here is a...

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....

In Shiny for R, why does Sys.Date() return yesterday's date inside a dateInput?

r,date,input,shiny
I have a dateInput in my ui.R as follows: dateInput("asOfDateTime", label = "As Of", value = Sys.Date(), max = Sys.Date()) For 2015-05-15, this gives the dateInput a default value of 2015-05-14. However, when I run Sys.Date() in the console on 2015-05-15, I get the correct value: 2015-05-15. Why does Shiny...

Shiny & ggvis select subset of data dynamically

r,shiny,ggvis
how can I select a subset of the data and plot it using shiny & ggvis? As the ggvis documentation states, it is not possible to swap the dataset using ggvis input_select. Besides this limitation it would be awesome if the data preprocessing & filtering would have to be performed...

Shiny: Creating an unique list from input file

list,unique,shiny
I have been trying for days to create a list from my uploaded file, using Shiny. My file (.csv) is uploaded and shows a table corresponding to the csv-file. However, I have a column named 'Peptide.Sequence', and from that I want to create a list of unique names, as it...

Shiny - How to Style a Selected Radio Buttons Label?

css,r,shiny
I found a question that was similar, but didn't address the problem when dealing this Radio Buttons in Shiny in their native form; i.e., without HTML. I have this line: column(6, h1(radioButtons(inputId="gender", "Gender", choices = list("combined" = "combined", "male only" = "male", "female only" = "female"), inline=TRUE))) which looks like...

How can I display my plot without toolbars, in Shiny?

html,css,r,twitter-bootstrap-3,shiny
This question is an extension of this question. I am plotting a rather large gglot in Shiny. Using renderPlot(width = 1500, height = 1000, ... I am able to show the whole plot; however, I now have a scrollbar on the right. I would like to extend the height of...

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...

Control argument names in reactivePlot in R Shiny

r,shiny
Drawing from the question select a variable from drop-down and pass it as an argument in reactivePlot in R Shiny and @Jdbaba answer, I was wondering if it was possible to control the name of variables we want to display. In @Jdbaba example, he uses dataset <- diamonds ... selectInput('x','X',names(dataset))...

Remove reactive expression in shiny app

r,shiny
My application works well with reactive expressions, but it's very slow. I have two functions : FixData which cleans and fix my data (more than 500k rows), this function is slow PlotData which returns a ggplot graph and is reasonably fast What I want to do first is importing my...

R Shiny - filter two table and heatmap simultaneously (with cells of fix width)

r,callback,filtering,shiny
I have two input tables: label and main_plot. I am able to filter the plot using controls in the sidePanel. Column in "main_plot" corresponds to columns of "label". I want to filter both tables using controls simultaneously. (e.g.: if I see only first and second column of "label" after filtering...

Reactively changing colour of an infobox, upon a click or hover over

javascript,html,r,shiny
I would like to use the reactiveValue, observe, observeEvent framework in shiny and shinydashboard to be able to reactively change the colour of an infoBox when clicked. I would also like it to display an image with some text in a popup box when hovering over the infoBox. As a...

How to upload/import a file in the new R shiny version 0.12 using DT package

r,datatable,upload,shiny
I have just updated shiny to version 0.12 and started to use the DT package (finding it a bit difficult to use but have to do it anyway). Basically I am trying to upload or import a file. This is my server code: shinyServer(function(input, output, session) { datasetInput <- reactive({...

How can I make the width of an image in a Shiny app dynamic?

css,r,image,shiny
I am writing an app and I want the image in the sidebarPanel to be just a bit bigger than the image I put inside it. As the window gets smaller or larger, so does the sidebar, but the image stays static. How do I fix this problem? Is there...

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...

Running various Shiny Apps in the same RStudio Server session

shiny
I haven't found much information about this problem. In the Administrator's Guide http://rstudio.github.io/shiny-server/latest/ says: Shiny Server can manage R processes running various Shiny applications over different URLs and ports. But I can't find where to host two apps in different ports in the same machine. In the RStudio session I...

Handling `'createWebDependency' is not an exported object from 'namespace:shiny'` error in Leaflet Shiny

leaflet,shiny
When I try using leaflet with shiny I get the error Error : 'createWebDependency' is not an exported object from 'namespace:shiny' A search online for this error doesn't give me any hits....

How to embed an image in a cell a table using DT, R and Shiny

r,shiny,shiny-server
How can I embed an image in a cell that is generated using the DT package so that it is displayed in an app using shiny? My example is based of this question R shiny: How do I put local images in shiny tables The example code below doesn't display...

Cannot produce ggplot2 in Shiny

r,ggplot2,shiny,ecdf
Below is my code. I am able to produce the ecdf plots in R studio but not when i put it all together in a shiny app like I have below: Server.R library(shiny) library(ggplot2) shinyServer(function(input, output) { datasetInput <- reactive({ mydf = data.frame( a = rnorm(100, 0, 1), b =...

Shinydashboard dashboardSidebar Width Setting

css,r,width,shiny
I'm using shiny (0.12.0) with shinydashboard (0.4.0) in R (RRO 8.0.3 CRAN-R 3.1.3) to create a UI, and I'm liking what I'm seeing. However, I would like to be able to control the width of the dashboardSidebar item, since I need to put some wide selector boxes in there. ui...

How to implement a reset button in R shiny?

r,shiny
In my shiny output, I have a DataTable. I have a button ("Compute") and a list. I want the following behavior: when the script is loaded, the data table is rendered using a NULL object when the user clicks on "Compute", a data table is shown when the user selects...

Dependent inputs in Shiny application with R

r,shiny
Say I have a shiny::sliderInput: ... sliderInput("input_1", "Title_1", min = 1, max = 10, value = 5) ... Is it possible to reference min, max, and/or value in a different sliderInput? The use case for this is to make a second a input dependent on the first input. Something to...

Shiny: Input selection through conditional panels is overruled

shiny
I would like to switch my input field from checkboxes to radio buttons, depending on which graph type is chosen. The input variables are equal in either case, but some graphs allow for multiple inputs and some not. The UI works like expected, but the radio buttons do not affect...

how to get values from selectInput with shiny

r,shiny
I am playing around with the shiny packages for some hours now, and wanted to make a select input widget that enables me to download a certain data set from the server. So i figured out a way to get me this data frame containing all my IDs for downloading:...

Use a reactive dataframe in Shiny to predict(svm)

r,shiny,shiny-server
I wanted to create an interactive Shiny app where users could input values for a dataframe, and then it would apply that dataframe to a predict in an svm, giving the output of the prediction based on the given values. However, I can't seem to figure out how to save...

evaluate function in shiny and print values

r,shiny
Suppose I have a function that takes an input an returns a data frame with two values. I want to render the following text: Value 1 is df1$value1, and value 2 is df1$value2. Is there a way of doing this? This is the code that I have right now: ##...

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

function,shiny,ggvis
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...

R Shiny - set reactive width of a plot output

plot,shiny,reactive-programming,weight
I am filtering a tbale and a heat-map simultaneously. During filtering, the width of the table is changing such that width of particular columns remains the same. Width of the heat-map remains the same during filtering. I want the heat-map to change its weight in the same way as the...

reactive + serverside Shiny datatable with extensions?

r,asynchronous,shiny
Update: I'm having trouble combining server-side datatables and a reactive dataframe If I run this code with server = FALSE, the table is rendered, with an alert If I run it with server = TRUE, I get "$ operator is invalid for atomic vectors" where the table should be. library(shiny)...

Disable textInput based on radio button selection on Shiny

r,shiny
Say I have the following Shiny App: library(shiny) ui <- fluidPage( column(3, radioButtons("radios", "", c("Enabled" = "enabled", "Disabled" = "disabled"), inline = TRUE) ), column(4, textInput("text", "", value = "Disable me")) ) server <- function(input, output) { } shinyApp(ui=ui, server=server) What's the easiest way to disable the textInput based on...

dplry in reactive function for shiny app using rmarkdown

r,shiny,dplyr
I am trying to combine the answers to the following two questions: Reactive subset in ddply for rmarkdown shiny Maintain data frame rows after subet In the first question I was shown how to properly use reactive to subset in shiny / rmarkdown. I the second I was shown how...

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,...

How to restrict Shiny fileInput to text files only?

shiny,rstudio
I want to restrict my file browser to displaying only the types of file I specify, e.g. .txt files only. The only relevant snippets of a code I found are like the following: fileInput("in_file", "Input file:", accept=c("txt/csv", "text/comma-separated-values,text/plain", ".csv") However, this does't filter the files showing in the browser to...

Filter data frame for use in multiple renderPlot functions

r,shiny
I have a shiny app that uses a reactive expression to respond to a user selecting a value from a drop-down list. The value chosen is then used as a filter condition on a data frame. If I want to create two different plots of the same filtered data frame,...

“Icon” (ISOTYPE) charts in R shiny with Javascript

javascript,r,plot,statistics,shiny
I'm working on a project to build several models for data analysis and reporting using R and the amazing Shiny framework for web development. I'm getting started with R and Shiny but I've had an amazing experience so far, yet, I'd like to get some help in case someone has...

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...

using a trycatch block to read a csv and an excel file

r,excel,csv,shiny,shiny-server
I am trying to give both options of uploading a csv and an excel sheet in shiny in one function. I am using read.csv to read the csv file and readworksheetfromfile from the XLConnect package to read the excel files. I am using trycatch block for this but I still...

Reactive input?

r,shiny
Suppose my shiny app looks like this: ## app.R ## library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar(radioButtons("Output", "Continuous or binary:", c("Continuous" = "Continuous", "Binary" = "Binary"), selected = "Continuous"), numericInput("sigma_y", "SD of y:", 0.1, min = 0, max = NA, step = 0.01), numericInput("mean_y", "mean_y:", 0.1, min = 0, max...

Sliders providing null values to complex shiny application at startup and periodically as inputs change

javascript,r,html5,null,shiny
I am currently developing a complex (multiple pages of nested navs/tabs) web application using R's Shiny package. I am currently experiencing an issue where sometimes accessing the values of these sliders from R via input$ returns NULL for no apparent reason. When this happens, the various outputs dependent on these...

R Shiny error when using shinyBS to disable actionButton if right-side of chooserInput is empty

r,button,shiny
This is my first question on stackoverflow, and I've been using R for 3 months. I have a lot to learn! Any help is much appreciated. Thank you in advance for your time. What I WANT to happen: The user selects a category (Animals or Foods) from a drop-down box...

Leaflet map legend in R Shiny app has doesn't show colors

r,shiny,leaflet
When I try to add a legend to a leaflet map for a leaflet map (using the Leaflet for R package) incorporated into a Shiny app, the legend does not show the colors of the color palette. Instead it only shows the colors specified for the NA values, in this...

submit input in text area using return without inserting a newline character

javascript,r,shiny
I have a binding for a textarea input in Shiny here. To submit the text entered press CTRL-return (CMD-return on Mac). I would prefer the text be submitted on pressing return (i.e., without CTRL or CMD) but without creating a newline. Is this possible? Note: A textarea, rather than a...

Forecasting an Arima Model in R Returning Strange Error

r,time-series,shiny,forecasting
I'm working on building a Shiny App for forecasting time series. One component of this is using ARIMA models to forecast. The user specifies the start and end of the historical data, what p, d, and q they would like to use in the ARIMA model (if they don't want...

Create interactive webmap with markers in R using Shiny, Leaflet and rCharts

r,maps,leaflet,shiny,rcharts
I am trying to create an interactive webmap in R to display storms using Shiny, Leaflet and rCharts (the structure is loosely based on the http://ramnathv.github.io/bikeshare app). The idea is that the user selects one storm name at a time (df$Name) and the markers for that storm (lat/long) are displayed...

How can I use a variable to get an Input$ in Shiny?

r,variables,csv,shiny
I am new to R and I am creating a shiny application to read a csv and filter data. I am reading the csv file, then creating dropdowns with a loop using the column names and the unique values: output$dropdowns <- renderUI({ if (is.null(x())) { return(NULL) } lapply(1:ncol(x()), function(i) {...

Hide shiny output

r,shiny,rmarkdown
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...

dplyr multiple inputs from Shiny

r,shiny,dplyr
I have a Shiny app that takes input from radio button and then use that to perform filter to the data frame using dplyr in the server side. It works, but now I want to expand it to take multiple inputs to filter, and I have no idea how to...

Sleep Shiny WebApp to let it refresh… Any alternative?

r,shiny,sleep
I have a WebApp that have some renderUI({})... and some of them depend on the input of another. This makes that, briefly, a red error in the webpage appear when I select some options. Because the if() clause of some renderUI({}) depend on the input of a selectizer. The error...

Alternate control of a sliderInput between a derived value and user selected value

r,shiny,data-visualization
I have a very simple Shiny app, wherein I have a set of data on past customers, and a set of data on 3 new customers. All my data consists only of 2 variables: age and score. The purpose is to select one of the 3 new customers, and see...

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...

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', "...

Error message when deploying app to Shinyapps.io

r,shiny
When deploying my app (shinyapps::deployApp('path/to/your/app'), I get the following error message: error: Parsing manifest ################################## Begin Log ################################## ################################### End Log ################################### Error: Unhandled Exception: Child Task 30191454 failed: Error parsing manifest: Unsupported locale: it_NA.UTF-8 It looks like it's got to do with encoding, as I am from Italy. However...

How to set scrollWheelZoom to false in a map using leaflet in Shiny?

r,leaflet,shiny
I am using Shiny to build an application using the leaflet library. I create the map at the ui.R using leafletOutput() and render it at server.R using renderLeaflet(). I can add markers, set zooming factor, etc. Everything works like a charm. The problem is that I cannot find a way...

Error when importing ggplot bubble chart into Shiny

r,ggplot2,shiny
I am having some trouble with Shiny and ggplot When I run the following code to produce a bubble chart in Shiny I am getting this error message : "Error in $<-.data.frame(*tmp*, "value", value = numeric(0)) : replacement has 0 rows, data has 3" But when I run it outside...

Favicon in Shiny

r,shiny,favicon
I wanted to add a favicon to my WebApp I'm using this line, but it doesn't work: HTML("<link rel=\"icon\" type=\"image/png\" href=\"image.png\" />") inside the ui.R script and outside the shinyUI() function. Also I have the image.png where the server.R and ui.R are. (I've also tried putting it inside the folder...

need finite 'xlim' values using reactive function in Shiny

r,shiny,linear-regression
I'm trying to build a Linear regression Shiny app with a custom file input. I have a problem with the reactive function in Server.R. The reactive function data returns a data frame called qvdata. When data() is called in renderPlot and I plot from the qvdata I get the following...

Reactive subset in ddply for rmarkdown shiny

r,shiny,subset,rmarkdown
I am trying to calculate and plot % yield of some data based on user definable inputs. I am using rmarkdown and shiny to do this. I keep getting stuck when passing a reactive subset through ddply to count the number of rows in the subset.."invalid (null) left side of...

How to format currency values in valueBox shinydashboard?

r,shiny,currency,dashboard
I'm trying to write a dashboard with shinydashboard in R to display some values using renderValueBox and valueBoxOutput. These values are not hardcoded but are being scraped from another source daily. These values are currency numbers and should be reporting like $XXX,XXX.XX but instead I see XXXXXX.XX. Is there a...

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...

HTML page which takes the input, runs the R code and gives the result back to HTML

html,r,shiny,knitr,rmarkdown
I'm trying to design a front end to display the result of my R code which takes 2 files,master.csv and detail.csv. Master.csv contains reference data with 2 columns which contains Commodity Category and Commodity Name as shown below: Sl.No. Commodity Category Commodity Name 1 Stationary Pencil 2 Stationary Pen 3...

Limiting the number of users in a locally hosted R shiny app

r,shiny
I'd like to limit the number of users of my locally hosted r shiny app to one user at any one time. So ideally when a second user attempted to run the app at the same time (users access the app by typing the local IP into the address field)...

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...

R Shiny: need consistent random sample with each customization

r,shiny,random-sample
This is my first ever question, so apologies in advance if I don't follow any of the site's norms! I'm experimenting with R Shiny. I am attempting to make an application that allows someone to customize a lot of the components of different distributions and kernel estimators. Before I go...

Disable rCharts animations

r,highcharts,shiny,rcharts,polychart
I am using rCharts and shiny in order to plot a variety of datasets. These datasets are dynamic and may in some cases be very big (10 000+ points in some cases). In these cases displaying the plot takes a lot of time (40s+). Is there a way to generate...

Global assignment within a reactive expression in R Shiny?

r,null,shiny,variable-assignment
suppose I have a data object that is uploaded by the user: data <- reactive({ inFile <- input$file if (is.null(inFile)) return(NULL) data <- read.csv(inFile$datapath) return(data) }) And suppose I want to delete columns in the dataset. I want to set it to global assignment so that I can run the...

Shiny renderUI selectInput returned NULL

r,shiny
I am trying to use a reactivity model with one input affecting several outputs as describe in the shiny cheat sheet. I need to use renderUI because the choices list is rendered dynamically (not shown in the example) However, during initialization selectInput returns NULL rather than the default value. After...

“read_excel” in a Shiny app

r,shiny,xlsx
I have a Shiny app that uses the "read.xlsx" function from package "xlsx". All works fine, but I want to change to "read_excel" from "readxl", hoping it would be faster and able to cope with large files. ui part: fileInput("inputFile","Upload file...") server part: data <- reactive({ inFile <- input$inputFile if...

Using filtered datatables in shiny

r,filter,datatable,datatables,shiny
I am new to shiny but was wondering if there is any way to store a filtered datatable (using the column filters) in a R object so that this filtered data can be passed to histogram and plot functions. EDIT May 7, 15: Including the author's expanded explanation from comments...

Changing the color of the sliderInput in Shiny walkthrough

css,r,shiny
I know that changing the color of the sliderInput in Shiny requires to change something in the css files, I tried to look inside the function sliderInput()with the source viewer but it kinda doesn't make sense to me as I do not know much about html and CSS. I guess...

Why mutate applied only to first row and repeats its result to the rest

r,shiny
I have a data frame which consists of several columns. One of them is date_created column in the unified format. I want to split it into year, month, day and add these columns to the same data frame. input: id date_created 1 02-20-2014 2 01-15-2015 result: id date_created year month...

R/Shiny WebApp logs, running in shell (Ubuntu crontab)

r,ubuntu,logging,shiny,crontab
I'm running, using crontab, an R/Shiny WebApp. The crontab expression looks like this: @reboot R -e 'shiny::runApp(...)' | tee /var/log/shiny-server.log I've also tried @reboot R -e 'shiny::runApp(...)' &> /var/log/shiny-server.log but does the same: It prints to the file the header when you initialize R from shell. But it doesn't print...

Custom play button for slider input in Shiny?

r,shiny
http://shiny.rstudio.com/reference/shiny/latest/sliderInput.html says that you can modify the appearance of the play button in slider input by using HTML tags or a character vector. I want my play button to be a bit bigger or use an image instead, I can't quite get it to work and can't find an example...

R shiny updateCheckboxInput

r,shiny
I have a R shiny application in which I have drop down box defined in ui.R as lib whose values are c("X","Y","Z") and also a check box called spcheck which is defined as checkboxInput("spcheck","label1",value = FALSE)) Other conditions makes this checkbox available only when input$lib=Z and checking it would make...

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)?

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...

Deploy shinydashboard referencing to a local file

shiny,shiny-server
I had dashboard that works great locally. The problem when I want to deploy it is that all my data sources are in my C drive. I am not sure how to refer to a local file. I have seen many code examples and all refer to a sever somewhere....

R - Shiny Package - Non-numeric argument to binary operator

r,shiny
I'm pretty new to using R and I'm just testing out some things with the Shiny package. In my application I request the user to give some inputs, based on these inputs the application has to make some calculations. The input gets asked from the user in the following way...

Shiny + GGplot - mouse click coordinates

ggplot2,shiny,rstudio
I have a doubt in shiny ploting a GGPlot Bar Graph. I can recognize coordinates of mouse click (x,y), but I need know a value of bar (x-axis) to refresh the graph with parameter and simulate a drill-down. Anyone can help me? library(shiny) library(ggplot2) ui <- fluidPage( plotOutput("plot", click =...

Shiny script from Ubuntu bash

r,bash,ubuntu,shiny
I wanted to run with crontab (the system daemon used to execute desired tasks at certain times) a shiny script. I first tried running sh Autorun.sh, being in the file: R shiny::runApp(...) but that didn't work I also tried writting directly Rscript shiny::runApp(...) but it also doesn't work Any ideas?...

Widget position when using rmarkdown for shiny

r,shiny
I am building an "interactive document" by writing code in rmarkdown and using a shiny runtime. Everything works fine but I would like to control the widget positions because I end up with lots of white space. There are plenty of useful pages describing how to do this when using...

rCharts doesn't render the plot in shiny app

r,plot,shiny,rcharts
I am using following simple shiny app code snippet to plot the output in the main pannel. But it doesn't render the plot as expected. It shows nothing in the browser. But When i run only the mPlot portion, it displays the plot in RStudio correctly with all interactions. ui.R...