I have this Shiny application that I want to run using the RInno package.
Right now my current problem is that after creating the app and then running compile_iss, I get to the setup of the application. Finally, when the application is launching it gives me the following error:
ERROR: Can't call `runApp()` from within `runApp()`. If your application code contains `runApp()`, please remove it.
My application does not contain runApp()
anywhere inside of it.
I have included this code at the end:
session$onSessionEnded(function() {
stopApp()
q("no")
})
I end my shiny app with:
shinyApp(ui = ui, server = server)
Does anyone know how I can resolve that error?
Added Code:
ui <- fluidPage(
titlePanel(""),
h5(""),
sidebarLayout(
sidebarPanel(
selectInput("type", "Select Type of Record:",
choices=c('A', 'B', 'C'),
selected="A"),
DT::dataTableOutput("responses", width = 300), tags$hr(),
textInput("Comment", "Comments:", ""),
actionButton("submit", "Submit")),
mainPanel(
plotlyOutput("plot")
)
)
)
server <- function(input, output, session) {
mydata <- reactive({
invalidateLater(30 * 60000,session)
odbcChannel<- odbcConnect("a", uid, pwd)
message <- sqlQuery(odbcChannel, "select a, b,c
from table
")
#I got rid of all the other stuff, as I figured it was unimportant. Let me know if you need to see more
})
session$onSessionEnded(function() {
stopApp()
q("no")
})
}