Interesting.
library(shiny)
ui <- basicPage(
plotOutput("plot1", click = "plot_click"),
verbatimTextOutput("info")
)
server <- function(input, output) {
output$plot1 <- renderPlot({
x <- runif(100)
y <- runif(100)
xyplot(y~x)
})
output$info <- renderText({
paste0("x=", input$plot_click$x, "\ny=", input$plot_click$y)
})
}
shinyApp(ui, server)
And notice I used xyplot. it worked! Let me see if there are any issues ... I 'm going to guess it wont work with trellis displays ...