-
Notifications
You must be signed in to change notification settings - Fork 28
Quick Start
This document is written for the first beta versions of rClr, for Windows.
To load the package for use with Microsoft .NET, whether you are using R i386 or x64:
library(rClr)
# Should print something like:
# Loading library assuming MS.NET
# Loading dynamic library F:/bin/R/library/rClr/libs//x64/rClr
clrInit()
# To get the package documentation
?rClr
# There is an 'Index' link at the bottom of the page.
Currently to use the Mono CLR, you need to set an environment variable prior to loading rClr. Note that the Mono distribution for windows is currently compiled and distributed in 32 bits only, so you are likely to need to run the i386 version of R. It is possible to set up rClr/Mono for x64 but is beyond the scope of this document.
Sys.which('mono')
If you get a path that is not null, e.g. as below, you should be able to load the Mono runtime with rClr.
"F:\\bin\\Mono\\bin\\mono.exe"
If mono.exe is not in your path, you can add it with for instance the following code in R
path = Sys.getenv('PATH')
path = paste(path, 'F:/bin/mono/bin', path, sep=';') # add directory where mono-2.0.dll resides.
Sys.setenv(PATH=path)
Then the following should work:
Sys.setenv(RCLR='Mono')
library(rClr)
If you try to load the mono runtime from Rgui 64 bits, you'll get:
Found the environment variable RCLR set to 'Mono'
Loading dynamic library F:/bin/R/library/rClr/libs//x64/rClrMono
Error : .onLoad failed in loadNamespace() for 'rClr', details:
call: library.dynam(chname, pkgname, libname)
error: DLL 'rClrMono' not found: maybe not installed for this architecture?
Error: package/namespace load failed for 'rClr'
You may then move on for instance to the tutorials in the Documentation