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 and Description
    `RExecutor()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RExecutor

          public RExecutor()

  - ### 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 script
        `arguments` - 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 script
        `arguments` - any arguments required by the script
      Returns:
        the return code of the R process