title: Calling R function from Javascript (Node)
body: <p>I'm trying to call a function from R script. I'm using <a href="https://www.npmjs.com/package/r-script" rel="nofollow noreferrer">r-script</a> like bellow :</p>
  
  <pre><code>var R = require("r-script");
  var out = R('SampleR.R').data(5, 20).callSync();
  console.log(out);
  </code></pre>
  
  <p>It returns undefined for R('SampleR.R'). Here is my R script, it's very simple script, just for testing.</p>
  
  <pre><code>print('Hello')
  </code></pre>
  
  <p>Please bear with me, I'm new to R script and javascript integration. What am I doing wrong here?</p>
  
  <p>I also tried <a href="https://github.com/codejie/js-call-r" rel="nofollow noreferrer">js-call-r</a> , but no luck so far!</p>