I'm working on my first shiny app. It's a simple line plot. I'm getting an error message on my selectinput line in the server.r file. What argument am I missing?
(ui.r)
shinyUI(fluidPage(
# Application title
titlePanel("US Violent Crime rate per 100,000"),
# Sidebar with a Panel input
sidebarLayout(
sidebarPanel(
selectInput("crime", "Please Select Crime Type", choices=c("All", "Murder", "Rape", "Robbery", "Assault")),
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("Plot")
)
)
))
(server.r)
data<- read.csv("FBI.csv"); ##attach(data);
library (ggplot2);
ShinyServer(function(input, output){
output$Plot <- renderPlot({
ggplot(data, aes(Year, input$crime)) + geom_line() + geom_point()
})
})
getting error
Listening on http://127.0.0.1:4812
Warning: Error in tag: argument is missing, with no default
Stack trace (innermost first):
55: tag
54: tags$form
53: tag
52: tags$div
51: div
50: sidebarPanel
49: sidebarLayout
48: tag
47: tags$div
46: div
45: tagList
44: attachDependencies
43: bootstrapPage
42: fluidPage
41: shinyUI
1: runApp