Package picard.util
Class RExecutor
- java.lang.Object
-
- picard.util.RExecutor
-
public class RExecutor extends Object
Util class for executing R scripts.
-
-
Constructor Summary
Constructors Constructor Description RExecutor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
executeFromClasspath
public static int executeFromClasspath(String rScriptName, String... arguments)
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
public static int executeFromFile(File scriptFile, String... arguments)
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
-
-