title: Source R file in reactive context (Shiny)
body: <p>Beginner Shiny question. </p>
  
  <p>I have two models living in different folders, <code>A</code> and <code>B</code>, both called <code>inputs.R</code>, and want to load one or the other using <code>selectInput</code> to choose the folder (in reality, there is more than one file in each folder, so I don't want to load the file directly). </p>
  
  <p>Currently, I have </p>
  
  <pre><code>ui &lt;- fluidPage(selectInput("model_folder", "Select folder", c("A", "B")))
  
  server &lt;- function(input, output){
      reactive({
      inpts &lt;- paste0("models/",input$model_folder, "/inputs.R") 
      source(inpts, local = T)
      })
  }
  </code></pre>
  
  <p>This does not work. Any thoughts would be greatly appreciated. </p>