This project is read-only.
Windows PowerShell let you use .NET Framework assembly on command line. Here's a short instruction of R.NET on Windows PowerShell.

Screenshot

PowerShell.png

Configuration

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:

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

More information is available at http://msdn.microsoft.com/en-us/library/1fk1t1t0.aspx.

Loading R.NET engine

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

[System.Reflection.Assembly]::LoadFile("C:\Path\To\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

Comments

No comments yet.