I've defined variables for use with ggplot in a renderPlot output. However, for this ggplot, it uses various dataframes depending on the inputs (managed by an event handler). I'm trying to use the ggplot data to create a nearPoints output, to display the x and y variables. Yet variables defined don't carry across between outputs, and it throws a, "____ (variable) not found" error in the nearPoints output.
Any suggestions, without having to rewrite the code defining each variable for every usage of it in the differing outputs? (Hope this helps understand the issue - can't share much code as it contains sensitive data). Thanks!!