How to Get Output from R Scripts

317 Views Asked by At

I have a .R Script and I am using deployR. My application is in Java and I have a client code interacting with the R code. The R code works fine and running it through deployR it generates a csv file too. This file is the output data that I need in my application.

I tried using the following :

RProjectExecution Execution = project.executeScript("XYZ.R", "root", "user", "", ExecutionOptions);
RData rDataOut =  Execution.about().workspaceObjects.get(0);

but the value of rDataOut results to NULL. I cannot share the whole code due to company policy.

Any help will be appreciated.

1

There are 1 best solutions below

0
On

Output files named in the API as artifacts:

List<RProjectFile> files = exec.about().artifacts;

Read more about https://msdn.microsoft.com/en-us/microsoft-r/deployr-client-library