mastering-shiny
mastering-shiny copied to clipboard
Code error in Exercises 5 of "1 Your first Shiny app"
Thanks for your excellent guidance !
I found some errors during my practice of Exercises 5 of "1 Your first Shiny app".
Here it is:
library(shiny)
library(ggplot2)
datasets <- c("economics", "faithfuld", "seals")
ui <- fluidPage(
selectInput("dataset", "Dataset", choices = datasets),
verbatimTextOutput("summary"),
tableOutput("plot") # **here should be: plotOutput("plot")**
)
server <- function(input, output, session) {
dataset <- reactive({
get(input$dataset, "package:ggplot2")
})
output$summmry <- renderPrint({
summary(dataset())
})
output$plot <- renderPlot({
plot(dataset) # **here should be: plot(dataset())**
}, res = 96)
}
shinyApp(ui, server)
I came here to report the same thing. It's been a year, and the maintainers haven't done anything about it. Could they at least allow the community to make the necessary changes? Hello? Is anyone listening?