Reputation: 68
Dear shiny and R community,
While I have no problem to upload and use any .csv,.txt file in my shiny applications, there seems no syntax that could acess the path of the uploaded .R script file and run a source() command on that path to use the included function.
Here what I tried:
scriptFile <- reactive({
req(input$scriptFileInput)
FileInput <- input$scriptFileInput
FileInput %>% source(.$datapath)
})
While this function does not produce any errors, when callig the function inside the .R script in shiny - no function is found. I already tried several approaches to acess the path of the uploaded file, but none of them seem to work.
Thanks, Robin.
Upvotes: 1
Views: 187