All,

First of all, thanks for all the support. I think there is something wrong when zorro tries to run R with the command Rrun.

I slightly modified the print statements in the script above and I added the r.h include. It now looks like:
#include <r.h>

function main()
{
if(!g->sRTermPath) {
printf("R path missing! ");
return;
}
if(!file_date(g->sRTermPath)) {
printf("%s not found! ",g->sRTermPath);
return;
}
string Cmd = strf("Command : %s --no-save",g->sRTermPath);
printf(Cmd);
hR = RInit_(Cmd,2);
if(!hR) {
printf("Can't initialize RTerm! ");
return;
}

Rx("rm(list = ls());"); // clear the workspace

var vecIn[5],vecOut[5];
int i;
for(i=0; i<5; i++)
vecIn[i] = i;

Rset("Rin",vecIn,5);
Rx("Rout <- Rin * 10");
Rv("Rout",vecOut,5);

if(!Rrun())
printf("\nError - R session aborted!");
else {
printf("\nReturned: ");
for(i=0; i<5; i++)
printf("%.0f ",vecOut[i]);
}
}

The output is:
Zorro 1.42.2 Trading Automaton
Made with Gamestudio by oP group 2015

testREnv compiling.................
Command : C:\R\bin\x64\Rterm.exe --no-save
Error - R session aborted!

So the script aborts when running the Rrun() command.

Just to make sure, I now installed R in C:\R as shown in the output. My RTermPath is:

RTermPath = "C:\R\bin\x64\Rterm.exe"

Both the x64 and the i386 do not work.

Jacco.