library(shiny)
ui <- fluidPage(
titlePanel("My Shiny App"),
sidebarLayout(
sidebarPanel(
tags$hgroup(
h1("Installation"),
h6("Shiny is availabel on CRAN, so you can install it in the usual way from your R console:"),
code("install.packages(\"shiny\")"),
br(),
br(),
br(),
br(),
img(src ="rstudio.png", height =70, width =180),
h6("Shiny is a product of ", span("RStudio", style ="color:blue")))),
mainPanel(
h1("Introducing Shiny"),
p("Shiny is a new package from RStudio that makes it ", em("incredibly easy")," to build interactive web applications with R."),
br(),
p("For an introduction and live examples, visit the ", a(href="https://shiny.rstudio.com/","Shiny homepage.")),
br(),
h1("Features"),
p("- Build useful web applications with only a few lines of code -- no JavaScript required."),
p("- Shiny applications are automatically 'live' in the same way that ", strong("spreadsheets"),"are live. Outputs change instantly as users modify inputs, without requiring a reload of the browser."))))
server <-function(input, output){}
shinyApp(ui = ui, server = server)
网页布局效果代码library(shiny)ui <- fluidPage( titlePanel("My Shiny App"), sidebarLayout( sidebarPanel( tags$hgroup( h1("Installation"), h6("Shiny is availabel on CRAN, so you can install it