title: R Script as a Function
body: <p>I have a long script that involves data manipulation and estimation. I have it setup to use a set of parameters, though I would like to be able to run this script multiple times with different sets of inputs kind of like a function.</p>
  
  <p>Running the script produces plots and saves estimates to a csv, I am not particularly concerned with the objects it creates.</p>
  
  <p>I would rather not wrap the script in a function as it is meant to be used interactively.
  How do people go about doing something like this?</p>
  
  <p>I found this for command line arguments : <a href="https://stackoverflow.com/questions/14525580/how-to-pass-command-line-arguments-when-source-an-r-file">How to pass command-line arguments when source() an R file</a> but still doesn't solve the interactive problem</p>