Lecture 25
College of Idaho
CSCI 2025 - Winter 2026
plotOutput() can accept pointer events (clicks, double clicks, hovers, brushes).input$ID.click = "ID" to plotOutput().input$ID (contains x, y coordinates).nearPoints() returns rows from the dataframe near the click.brush = "ID" to plotOutput().brushedPoints() returns rows inside the brush.click: Single click.dblclick: Double click.hover: Mouse hover (triggers frequently).brush: Drag-to-select rectangle.
brush = brushOpts(direction = "x").brushedPoints() to filter the data.plotOutput(..., click = "click_id", brush = "brush_id").nearPoints(df, input$click_id): Find single point.brushedPoints(df, input$brush_id): Find multiple points.