Import R code into Gauss?

Is it possible to import R code directly into Gauss without having to 'translate' it?

1 Answer



0



Most people that I know that call R from other high level languages (GAUSS/C#/Matlab, etc) use system commands to run R scripts in batch mode. There are some COM based connectors available, but I hear people have trouble with them much more often than I hear that people use them.

In GAUSS you can call other executables with the exec command. You pass it the executable name and the commands. For example, you could run an R script named myscript.R like this:

rloc = "C:\\Program Files\\R\\R-3.1.2\\bin\\R.exe";
cmnd = "CMD BATCH C:\\myrscripts\\myscript.R";

exec(rloc, cmnd);

If the R executable is in your path, then you won't need to put the full path to R.exe in the string.

Your Answer


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy