I am passing a data frame into ggplot which is then rendered by plotly. Plotly allows the resulting plot to be filtered by selecting legend items, turning them on and off, which then shows filtered views of the plot - more or less points. All works very well. Is there a way to get the filtered data frame without having to build filters in R? In other words, plotly does the filtering thru user interaction and the filtered data is shown on the plot, but how do I "get" the filtered data for further use without having to build code - it's already done by plotly?
thank you.