Receiving information from plotly Rstudio


Is there any way to have information sent between the interactive plotly view and the R session? I know how to do this in Shiny, where you can send information back and forth to the server side. But is there anyway to achieve the same thing without using Shiny and just working within Rstudio? E.g. selecting points in the plot permanently changes a data frame within the R session?