Class Globals


  • public class Globals
    extends Object
    • Field Detail

      • cranRepos

        public static String cranRepos
      • RScript_Windows

        public static String RScript_Windows
      • RScript_Linux

        public static String RScript_Linux
      • RScript_Mac

        public static String RScript_Mac
      • Rscript_current

        public static String Rscript_current
      • R_Windows

        public static String R_Windows
      • R_Linux

        public static String R_Linux
      • R_Mac

        public static String R_Mac
      • R_current

        public static String R_current
      • useArrowIfAvailable

        public static boolean useArrowIfAvailable
        Whether we should try to use Apache Arrow for transferring output data
      • failIfArrowNotAvailable

        public static boolean failIfArrowNotAvailable
        Whether we should not use XML as backward behavior if useArrowIfAvailable is true but Arrow is not available
      • standardLocale

        public static Locale standardLocale
      • standardCharset

        public static Charset standardCharset
    • Constructor Detail

      • Globals

        public Globals()
    • Method Detail

      • detect_current_rscript

        public static void detect_current_rscript()
      • isMac

        public static boolean isMac()
      • isWindows

        public static boolean isWindows()
      • findFileRecursively

        public static File findFileRecursively​(File startingPath,
                                               String filename)
      • setRscriptCurrent

        public static void setRscriptCurrent​(String rscript_current)
        Sets the default location of Rscript executable manually. Note that this also sets the default Rscript location for the platform (for the session).
        Parameters:
        rscript_current - path to the Rscript executable
      • setR_current

        public static void setR_current​(String r_current)
        Sets the default location of R executable manually. Note that this also sets the default R location for the platform (for the session).
        Parameters:
        r_current - path to the R executable
      • setRPaths

        public static void setRPaths​(String rscript_current,
                                     String r_current)
        Convenience method to set both Rscript and R default paths in one call.
        Parameters:
        rscript_current - path to the Rscript executable
        r_current - path to the R executable
      • getSystemSpecificRPathParameter

        public static String getSystemSpecificRPathParameter​(File file)
        Convenience method to convert parameters for R that contain a path to the correct format.
        Parameters:
        file - object for which the absolute patch is needed
      • setChatset

        public static void setChatset​(Charset charset)
        Sets charset to be used with locale in JVM environment managed by ProcessBuilder. Default charset is UTF-8.
        Parameters:
        charset - charset to encode string before send through ProcessBuilder
      • setLocale

        public static void setLocale​(Locale locale)
        Sets locale to be used with charset in in JVM environment managed by ProcessBuilder. Default locale is the current locale for this instance of JVM.
        Parameters:
        locale - locale to be set with charset in environment managed by ProcessBuilder