shiny-server
Accept HTTP Request in R shiny application
@jdharrison’s answer is one way how you can handle GET requests in Shiny. Unfortunately, his or her statement that shiny doesnt handle POST requests unfortunately. is not, strictly speaking, 100% accurate. You can handle POST requests in Shiny with the help of the function session$registerDataObj. An example of using this function can be found in … Read more
R Shiny REST API communication
If you do not have to use Shiny, you can use openCPU. OpenCPU provides each of your R packages as REST service automatically. I work with OpenCPU and it works fine! It is the easiest way to use R from another program.
How do you pass parameters to a shiny app via URL
You’d have to update the input yourself when the app initializes based on the URL. You would use the session$clientData$url_search variable to get the query parameters. Here’s an example, you can easily expand this into your needs library(shiny) shinyApp( ui = fluidPage( textInput(“text”, “Text”, “”) ), server = function(input, output, session) { observe({ query <- … Read more
pandoc version 1.12.3 or higher is required and was not found (R shiny)
Go into RStudio and find the system environment variable for RSTUDIO_PANDOC Sys.getenv(“RSTUDIO_PANDOC”) Then put that in your R script prior to calling the render command. Sys.setenv(RSTUDIO_PANDOC=”— insert directory here —“) This worked for me after I’d been struggling to find how rmarkdown finds pandoc. I had to check github to look at the source.
Hosting and setting up own shiny apps without shiny server
If your PC and your coworkers PCs belong to the same LAN, this is pretty easy to achieve. Just run your app through: runApp(host = “0.0.0.0”, port = 5050) The value set through the host argument says to accept any connection (not just from localhost). The port argument can assume any value that you want … Read more
Shiny: what is the difference between observeEvent and eventReactive?
As @daatali is saying the two functions are used for different purposes. ui <- shinyUI(pageWithSidebar( headerPanel(“eventReactive and observeEvent”), sidebarPanel( actionButton(“evReactiveButton”, “eventReactive”), br(), actionButton(“obsEventButton”, “observeEvent”), br(), actionButton(“evReactiveButton2”, “eventReactive2”) ), mainPanel( verbatimTextOutput(“eText”), verbatimTextOutput(“oText”) ) )) server <- shinyServer(function(input, output) { etext <- eventReactive(input$evReactiveButton, { runif(1) }) observeEvent(input$obsEventButton,{ output$oText <- renderText({ runif(1) }) }) eventReactive(input$evReactiveButton2,{ print(“Will not print”) … Read more