title: Calling R as a web service with parameters and load a JSON?
body: <p>I am pretty new with <code>R</code>. What I am trying to do is to be able to load a URL from another application (Java) which will run an <code>R</code> script and output a <code>JSON</code> so my application can work with it.</p>
  
  <p>I understand there are some frameworks like <code>shiny</code> which act as web servers for R,  but I can't find documentation on those frameworks on how to pass parameters via the URL so R can use them.</p>
  
  <p>Ideally I will need to call a URL like:</p>
  
  <pre><code>http://127.0.0.1/R/param1/param2
  </code></pre>
  
  <p>And that URL will call an R script which will use <code>param1</code> and <code>param2</code> to perform some functions and return a <code>JSON</code> which I will then read from my app.</p>