-
Notifications
You must be signed in to change notification settings - Fork 28
Hello World
Atif Aziz edited this page Oct 17, 2017
·
1 revision
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.
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.
One thing to note: on Windows if you use the RGui.exe
tool instead as a terminal, you will not see the greeting: