This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Interactive data point selection with ggplotly/plotly charts, return selected key to variable | |
## Load required packages | |
library(plotly) | |
library(ggplot2) | |
library(shiny) | |
## Defining a key column in mtcars which will be used for event handling in event_data() | |
row.names(mtcars) <- gsub(' ','.',row.names(mtcars)) | |
mtcars$key <- row.names(mtcars) |