title: Integrate R with NodeJS
body: <p>I'm new in Node and I'm searching for a way to integrate Node js with the R compiler. How can i run a R script in Node or maybe compile it with R and then get the result ? Thanks</p>
  <p>I need something like this</p>
  <pre class="lang-js prettyprint-override"><code>...
  
  // i need to compile and get the result of a R file like this
  // the R script returns a number between 0 and 100
  var exp = compileRFile(&quot; **file location** &quot;);
  
  if (exp &lt;= 0.1){
      console.log(`your exp ${exp} is lower than 0.1`);
  }else {
  
  ...
  </code></pre>