I have a Shiny dashboard app where the user inputs their name into a text box.
The dashboard then reads in the users dataset after retrieving the data from a connected database and assigns it to a variable that includes their user name
Example
assign(paste0(input$user_name, "_dataset"),
sqlQuery(connectionString, str_paste("Select * from ",user_name,"_table;"))
)
Question: Without knowing input$user_name
how can I refer to the variable when preparing plots and charts from the data?
I tried this,
plot_ly(paste0(input$user_name, "_dataset"), x = ..., y = ... etc)
but it does not work.