Complying with tradition, let's go for traditional Hello World sample.

On windows open a CMD terminal, and execute R. If you have set your path, you should just have to type 'R' to get the R terminal starting.

001.png

with rClr an Hello World! sample translates to the three following lines. The call to clrInit() is taking care of logistical tedium and will likely be unnecessary in the future.

library(rClr)
clrInit()
# Note: clrCallStaticMethod renamed to clrCallStatic as of beta 1
clrCallStatic('System.Console', 'WriteLine', 'Hello, World!')


You should see a couple of lines: the greeting, and NULL. All calls to .NET methods are considered to return values at this stage.

002.png

One thing to note: on Windows if you use the RGui.exe tool instead as a terminal, you will not see the greeting:

003.png

Last edited Feb 25, 2013 at 11:42 PM by jperraud, version 3

Comments

No comments yet.