Drop files here
or click to upload
library(shiny)
hello(1)
# Define UI
ui <- fluidPage(
titlePanel("Hello World Shiny App"),
sidebarLayout(
sidebarPanel(
textInput("name", "Enter your name:", "World")
),
mainPanel(
tabsetPanel(id = "tabs",
tabPanel("Greeting",
h3("Greeting:"),
textOutput("greeting")
),
tabPanel("About",
h3("About this App"),
p("This app greets the user with a name. Enter your name on the left panel.")
),
tabPanel("Contact",
h3("Contact Information"),
p("You can reach us at example@example.com.")
)
)
)
)
)
# Define server logic
server <- function(input, output) {
output$greeting <- renderText({
paste("Hello,", input$name, "!")
})
}
# Run the application
shinyApp(ui = ui, server = server)
Hi! I can help you with any questions about Shiny and R. What would you like to know?