Selected values from scatterplot

I am looking to get the values which the user selected from a scatterplot.

In shiny I embedded the event_data(“plotly_selected”) method and can see that it delivers some curveNumber and pointNumber values from the selected observations.

Is there a possibilty to slice the dataframe based on the selected datapoints (using box select) from the plot?

Thank you.

I am looking for something like this:

However, plotlyOutput does not support the brush method. Or am I missing something? Thanks.

Edit: Got it. This helped me: