Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
shinyServer(function(input, output) {
output$myplot <- renderPlot({ plot(cars) })
output$hoverinfo <- renderTable({
if (is.null(input$myplot_hover))
NULL
else
data.frame(x=input$myplot_hover$x, y=input$myplot_hover$y)
})
})
shinyUI(basicPage(
plotOutput("myplot", hoverId="myplot_hover"),
tableOutput("hoverinfo")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.