SQL 2016 error : Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime
<p>I started to explore R on SQL 2016 but running into errors. I resolved a few starting errors but can't get through with this one:</p>

<pre><code>exec sp_execute_external_script  
  @language =N'R',    
  @script=N'OutputDataSet&lt;-InputDataSet',      
  @input_data_1 =N'select 1 as hello'    
 with result sets (([hello] int not null));    
go   
</code></pre>

<p>Error:</p>

<blockquote>
  <p>Msg 39021, Level 16, State 1, Line 1
  Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime.</p>
  
  <p>Msg 39019, Level 16, State 1, Line 1
  An external script error occurred: 
  Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).</p>
  
  <p>Msg 11536, Level 16, State 1, Line 1
  EXECUTE statement failed because its WITH RESULT SETS clause specified 1 result set(s), but the statement only sent 0 result set(s) at run time.</p>
</blockquote>

<p>I found answers to set the Working Directory for R in Rlauncher.config.</p>

<p>But there is no Rlauncher.config on below path on my machine. Not Sure why?</p>

<blockquote>
  <p>C:\Program Files\Microsoft SQL Server 2016\MSSQL13.SQL2016\MSSQL\Binn</p>
</blockquote>

<p>When I check the error log I see the following errors:</p>

<blockquote>
  <p>2016-11-13 19:41:14.131    Security Context Manager is initialized successfully.</p>
  
  <p>2016-11-13 19:41:14.132    Satellite Session Manager is initialized successfully.</p>
  
  <p>2016-11-13 19:41:14.133    Launcher DLL RLauncher.dll not loaded! Error: 126</p>
  
  <p>2016-11-13 19:41:14.133    Failed to load the launcher RLauncher.dll and check satellite version</p>
  
  <p>2016-11-13 19:41:14.133    No Launcher dlls were registered!</p>
</blockquote>

<p>Please help.</p>