Object 'ui' not found

shiny

#1

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:

library(shiny)

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!

Cheers,
H


#2

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?


#3

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!

H

Envoyé de mon iPhone