Windows PowerShell let you use .NET Framework assembly on command line. Here's a short instruction of R.NET on Windows PowerShell.




You first need to create (or modify) your PowerShell configuration file (powershell.exe.config or powershell_ise.exe.config). The configuration file is an XML file. Your configuration file should be like as the following:

   <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0"/>

More information is available at

Loading R.NET engine

Here's a snippet to load R.NET engine. Use the proper version (x86 or x64) of R.NET.dll.

[RDotNet.REngine]::SetDllDirectory("C:\Program Files\R\R-2.12.0\bin\i386")
$engine = [RDotNet.REngine]::CreateInstance("RDotNet", ("-q"))  # quiet mode

Last edited Feb 28, 2011 at 6:39 AM by kos59125, version 1


No comments yet.