Class R


  • public class R
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.BufferedReader error  
      private java.io.BufferedReader input  
      static int MAXPOLLS  
      private java.io.BufferedWriter output  
      private static java.lang.String pathToR  
      static int POLLINTERVAL  
      private static R r  
      private java.lang.Process rProcess  
      private boolean running  
      static java.lang.String[] SEARCH  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private R​(java.lang.String pathToR)  
    • Field Detail

      • SEARCH

        public static java.lang.String[] SEARCH
      • input

        private java.io.BufferedReader input
      • output

        private java.io.BufferedWriter output
      • error

        private java.io.BufferedReader error
      • rProcess

        private java.lang.Process rProcess
      • running

        private boolean running
      • r

        private static R r
      • pathToR

        private static java.lang.String pathToR
    • Constructor Detail

      • R

        private R​(java.lang.String pathToR)
           throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getInstance

        public static R getInstance()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInstance

        public static R getInstance​(java.lang.String pathToR)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFromR

        private java.lang.String getFromR()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • execute

        public java.lang.String execute​(java.lang.String command)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • executeNewLine

        private java.lang.String executeNewLine()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shutdown

        public void shutdown()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendToR

        private void sendToR​(java.lang.String command)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setMatrix

        public void setMatrix​(java.lang.String label,
                              Matrix matrix)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findR

        private static java.lang.String findR()
      • getMatrix

        public Matrix getMatrix​(java.lang.String label)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isAvailable

        public static boolean isAvailable()
      • toString

        public static java.lang.String toString​(java.lang.String[] strings)
      • plot

        public void plot​(Matrix matrix,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • pairs

        public void pairs​(Matrix matrix,
                          java.lang.String... format)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • qqnorm

        public void qqnorm​(Matrix matrix,
                           java.lang.String... format)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hist

        public void hist​(Matrix matrix,
                         java.lang.String... format)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • image

        public void image​(Matrix matrix,
                          java.lang.String... format)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • boxplot

        public void boxplot​(Matrix matrix,
                            java.lang.String... format)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • closeLastFigure

        public void closeLastFigure()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception