I am trying now since days to get my Shiny App working so that when I move my mouse to certain points in the plot they are displayed in a table but unfortunately it is not working. I am not sure what I am doing wrong, can you help me?
border <- table$A < 0.03
ui <- fluidPage(
mainPanel(
plotOutput("Plot",click="plot_click"),
tableOutput("HitSpots")
)
)
server <- function(input, output){
output$Plot <- renderPlot({
ggplot(table,aes(x=table$A, y=table$B), colour=border)) +
geom_point()
})
hit <- reactive({ nearPoints(table, input$plot_click) })
output$HitSpots <- renderTable({
hit()
}
}
shinyApp(ui = ui, server = server)