Package picard.util

Class RExecutor


  • public class RExecutor
    extends Object
    Util class for executing R scripts.
    • 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