I'm having trouble calling the source()
function in shiny.
The ideia is that the user, based on a text input
(in this case, input$textinput
), see some details on the subject he typed, like maps and datatables of it.
here's the code of how it works inside an observeEvent
observeEvent(input$search, {
source("maps.R", local = TRUE)
source("graphs.R", local = TRUE)}
At first i realized that i needed to set the argument local = true
inside source()
. It then recognized the input$textinput
, but still wouldn't load the maps and the graphs as it was supposed to.
I then realized that when i call the source()
the objects didn't load into the global enviroment
.
Any ideas of what i'm doing wrong?