r,shiny,shiny-server,shinyapps,shinydashboard
My first instinct is that you can't simply copy all the apps code into one place and expect it to work, you'll have to do a little bit of work to integrate them all together. For example, if two of your apps have an input field with id "foo", then...
You had the right idea, but the select input in shiny actually uses selectize JavaScript to show the UI instead of the traditional select HTML tag. That's why your CSS isn't catching. What you want instead of the select CSS is ".selectize-input { font-size: 32px; } However, if you only...
To fix the issue, do the following: Switch out the submit button and use an action button instead. Write an output using RenderUI to either show nothing if scatter or show the radiobutton if line plot. Modify #2 above so that its reference to input$plot is isolated and only updated...
Set renderer to canvas in set_options: library(ggvis) mtcars %>% ggvis(~wt, ~mpg) %>% layer_points() %>% set_options(width = 300, height = 200, padding = padding(10, 10, 10, 10), renderer = "canvas") ...
r,google-chrome,batch-file,shiny,shinyapps
I have solved it that way with a few changes to run.vbs and runShinyApp.R. run.vbs: Rexe = "R-Portable\App\R-Portable\bin\R.exe CMD BATCH" Ropts = "--no-save --no-environ --no-init-file --no-restore --no-Rconsole " RScriptFile = "runShinyApp.R" Outfile = "ShinyApp.log" startChrome = "GoogleChromePortable\Chrome\chrome.exe --app=http://127.0.0.1:7777" strCommand = Rexe & " " & Ropts & " " &...
When you use the updateCheckboxGroupInput you still have to provide what goes in there. rm(list = ls()) library(shiny) choices <- letters[1:5] runApp(list( ui = basicPage( checkboxGroupInput('chkGrp', 'Options', choices), actionButton("all","All"), actionButton("none","None"), verbatimTextOutput("value") ), server = function(input, output, session) { output$value <- renderPrint({ input$chkGrp }) observe({ if ( is.null(input$all) || input$all ==...
shiny,shiny-server,rmongodb,shinyapps
There is no need for a reactive command in your server function. I have simplified and corrected your function below: server <- function(input, output) { output$main_plot <- renderPlot({ nameFinal <- paste0(input$userName) query = mongo.bson.buffer.create() mongo.bson.buffer.append(query, "user", nameFinal) query = mongo.bson.from.buffer(query) queryresults <- mongo.find.all(mongo=mongo, ns = "simpledb.main", query=query) if (length(queryresults) >...
If you don't need months and days, then I'd argue that what you want is not dates but just year. If you just want year, then I would use a selectInput instead of a dateInput. Usually dateInput are used when you literally want a full date, but it makes a...
r,shiny,rstudio,shiny-server,shinyapps
To comeback to my 'quick' fix solution is to use iframe, you can upload the video onto youtube and then use the iframe to show it, something like this: rm(list = ls()) library(shiny) ui <- pageWithSidebar( headerPanel("Welcome!"), sidebarPanel(), mainPanel( HTML('<iframe width="600" height="400" src="//www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allowfullscreen></iframe>') ) ) server <- function(input,...
As the error message says, please install shinyapps from https://github.com/rstudio/shinyapps It is not a package on CRAN, so you cannot install.packages().
For the dropdown options, it's line-height that you want (the padding is already 0 by default I think, look at the CSS on it using the chrome debugger). For the box itself, it looks like bootstrap is placing a min-height on it, so you also need to add min-height: 0;....
You could create another reactive function that returns a list, like this: shinyServer( function(input, output, session) { site <- reactive({ unlist(list("site1" = input$site1, "site2" = input$site2, "site3" = input$site3, "site4" = input$site4)) } output$text <- renderUI({ site = site() }) output$plot = renderPlot({ site = site() }) }) Then you...
According to this answer, this can be fixed by manipulating the CSS in ui.R tags$style(type="text/css", ".recalculating { opacity: 1.0; }" ) ...
r,shiny,shiny-server,shinyapps,shinydashboard
You should send the variable names instead of the data itself. Try changing: brushedPoints(mtcars,input$plot_brush,mtcars$wt,mtcars$mpg) with: brushedPoints(mtcars,input$plot_brush,"wt","mpg")...
r,function,user-interface,shiny,shinyapps
There's several ways to write the function you want. Here's an example of such a function that accepts a dataset and a column name and creates the associated select input. mySelectInput <- function(data, col) { id <- sprintf("select_%s", col) label <- sprintf("Select %s", col) choices <- sort(unique(data[[col]])) selectInput(id, label, choices)...
Yes. It is possible and here is an example: Create a simple db: library(RSQLite) con <- dbConnect(SQLite(), dbname="sample.sqlite") dbWriteTable(con, "test", data.frame(value1 = letters[1:4], value2 = letters[5:8])) dbDisconnect(con) Shiny App: library(shiny) library(RSQLite) runApp(list( ui = bootstrapPage( textInput("value1", label = "Value 1"), textInput("value2", label = "Value 2"), actionButton("action", label = "Write to...
r,shiny,shiny-server,shinyapps
The problem is that you're only using the one observe. It runs whenever any reactive element inside it changes - in your case that's anything at all. Specifically, when you change the "Fixed" checkbox group, this part of the observe also runs again: colnames<-names(data()) updateCheckboxGroupInput(session, "Fixed", choices = colnames, selected=colnames)...
I am not aware of any Shiny specific way but you can always use css to style output images. Just add tags$style with a following content to your UI: "#plot1 img, #plot2 img { width: 60%; display: block; margin-left: auto; margin-right: auto; }" and remove width="60%" from plotOutput. Excluding width...
html,r,twitter-bootstrap,shiny,shinyapps
Try this to allow parsing of links... output$table <- renderDataTable({ get_table() },escape=FALSE) Or escape individual columns as indicated in the documentation...
r,graphics,global-variables,shiny,shinyapps
To assign global variables you can use <<- E.g: temp1 <<- 2 ...
You can just use the format() function here as outlined in the help page for Sys.Date(). See ?strptime for all the different specifications: > c(2014, format(Sys.Date(), "%Y")) [1] "2014" "2015" If you actually need integer values, then: > c(2014L, as.integer(format(Sys.Date(), "%Y"))) [1] 2014 2015 ...
shiny,nvd3.js,rcharts,shinyapps
I tested your code and added the library argument nvd3 to the UI section like this: box(showOutput("distPlot2",'nvd3'),width = 6) to load the javascript library. I was able to adjust the width of the box on the ui side and/or the width of the chart on the server side.
It seems to be a problem with plyr, which is probably going to get fixed in the next R update. Until then you can fix it following these steps: Install platform specific development tools: Windows: Download and install Rtools33.exe from http://cran.r-project.org/bin/windows/Rtools/ Ubuntu or Debian based Linux: sudo apt-get install r-base-devel...