Package picard.util
Class RExecutor
java.lang.Object
picard.util.RExecutor
Util class for executing R scripts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
executeFromClasspath
(String rScriptName, String... arguments) Executes the given R script that is stored in a file on the classpath.static int
executeFromFile
(File scriptFile, String... arguments) Executes the given R script that is stored in a file by a call to Rscript.
-
Constructor Details
-
RExecutor
public RExecutor()
-
-
Method Details
-
executeFromClasspath
Executes the given R script that is stored in a file on the classpath. The script file is read from the classpath and written to a temp file then executed by a call to Rscript. Blocks until the R script is complete.- Parameters:
rScriptName
- the fully qualified name of the classpath resource of the scriptarguments
- any arguments required by the script- Returns:
- the return code of the R process
-
executeFromFile
Executes the given R script that is stored in a file by a call to Rscript. Blocks until the R script is complete.- Parameters:
scriptFile
- the file object for the scriptarguments
- any arguments required by the script- Returns:
- the return code of the R process
-