I quiet novice to Rshiny. I want to capture the information(variables) entered by the user and pass them to python script, which I would be calling in the R itself. But initially I need help in the server code, where I am not doing something correct in the reactive code part.
My code till now is:
library(shiny)
ui <- fluidPage(
headerPanel(
titlePanel("RADP CR Prediction Tool"),
br(),
tags$head(tags$script(src = "message-handler.js")),
textInput('Region', label = 'Enter the region'),
textInput('Regulatory', label = 'Enter the regulatory status'),
textInput('Description', label = 'Enter the description for the CR'),
br(),
br(),
actionButton("goButton", "Go!"),
mainPanel(
# Output: Formatted text for caption ----
h3(textOutput("caption", container = span)),
# Output: Verbatim text for data summary ----
verbatimTextOutput("summary"),
# Output: HTML table with requested number of observations ----
tableOutput("view")
)
)
server <- function(input, output, session) {
region_input=reactive(input$Region)
regulatory_input <- reactive(input$Regulatory)
description_input <-reactive(input$Description)
observeEvent(input$do, {
session$sendCustomMessage(type = 'testmessage',
message = 'Thank you for clicking')
})
}
shinyApp(ui, server)
When I run the code it gives me Error: unexpected symbol in: ") server"
I need to use the regulatory_input, description_input and region_input as R variables, so that I can do further analysis.