Saturday, 3 September 2016

R Shiny App Error - Couldn't Find Any UI

I wrote this code and initially Shiny worked just fine and the app started:



library(shiny)    
ui <- fluidPage(
titlePanel("Title"),

sidebarPanel(
sliderInput("priceInput", "Price", min = 0, max = 100,
value = c(25,40), pre = "$")
),
mainPanel("Results")
)


But when I add any UI element to it, for example radioButton:




ui <- fluidPage(
titlePanel("Title"),
sidebarPanel(
sliderInput("priceInput", "Price", min = 0, max = 100,
value = c(25,40), pre = "$"),
radioButtons("typeInput", "Product type",
choices = c("p1", "p2", "p3"),
selected = "p1")
),
mainPanel("Results")

)


I get an error:



Shiny couldn't find any UI for this application. We looked in:    
www/index.html
ui.R
app.R



Any idea what might cause this? I tried other options instead of a radio button and received the same error. My server file is just an empty file with the server function.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...