Object 'ui' not found

Hi everyone,

I'm new to R. This thing looks awesome but I'm currently struggling with some probably very basic stuff.

I'm currently doing the Shiny tutorial and some code that should run by itself does not. Here it is below:


ui <- fluidPage(

server <- function(input, output, session) {

shinyApp(ui, server)

It says Error in force(ui) : object 'ui' not found

I've tried to download additional packages, in case. But without any success.

Does anyone know where that comes from?

Thanks for your help!


How are you running this code?

Are you using the "Run App" button in the RStudio IDE?
Are you attempting to just run the line shinyApp(ui, server) without having previously executed the lines defining ui and server?


Hi Josh,

I think I may have posted too soon. I found a video on youtube explaining how ui.r and server.r are used. So it seems that the way it was explained in the tutorial was not really straightforward.

I think I get it now.

Thanks again for your message!


Envoyé de mon iPhone

1 Like