Package com.github.rcaller.util
Class Globals
- java.lang.Object
-
- com.github.rcaller.util.Globals
-
public class Globals extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Stringaboutstatic StringcranReposstatic booleanfailIfArrowNotAvailableWhether we should not use XML as backward behavior ifuseArrowIfAvailableis true but Arrow is not availablestatic Stringlicensestatic StringR_currentstatic StringR_Linuxstatic StringR_Macstatic StringR_Windowsstatic StringRscript_currentstatic StringRScript_Linuxstatic StringRScript_Macstatic StringRScript_Windowsstatic CharsetstandardCharsetstatic LocalestandardLocalestatic GraphicsThemethemestatic booleanuseArrowIfAvailableWhether we should try to use Apache Arrow for transferring output datastatic Stringversion
-
Constructor Summary
Constructors Constructor Description Globals()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddetect_current_rscript()static FilefindFileRecursively(File startingPath, String filename)static StringgetSystemSpecificRPathParameter(File file)Convenience method to convert parameters for R that contain a path to the correct format.static booleanisMac()static booleanisWindows()static voidsetChatset(Charset charset)Sets charset to be used with locale in JVM environment managed by ProcessBuilder.static voidsetLocale(Locale locale)Sets locale to be used with charset in in JVM environment managed by ProcessBuilder.static voidsetR_current(String r_current)Sets the default location of R executable manually.static voidsetRPaths(String rscript_current, String r_current)Convenience method to set both Rscript and R default paths in one call.static voidsetRscriptCurrent(String rscript_current)Sets the default location of Rscript executable manually.
-
-
-
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 ifuseArrowIfAvailableis true but Arrow is not available
-
standardLocale
public static Locale standardLocale
-
standardCharset
public static Charset standardCharset
-
theme
public static GraphicsTheme theme
-
version
public static final String version
- See Also:
- Constant Field Values
-
about
public static final String about
- See Also:
- Constant Field Values
-
license
public static final String license
- See Also:
- Constant Field Values
-
-
Method Detail
-
detect_current_rscript
public static void detect_current_rscript()
-
isMac
public static boolean isMac()
-
isWindows
public static boolean isWindows()
-
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 executabler_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
-
-