Collection of utility methods for operating systems.
Execute a command in a new process
|processName||Process name e.g. “uname”|
|arguments||Arguments e.g. “-s”|
returns: The output of the command to the standard output stream
Try to locate the directory path to use for the R_HOME environment variable. This is used by R.NET by default; users may want to use it to diagnose problematic behaviors.
|rPath||Optional path to the directory containing the R shared library. This is ignored unless on a Unix platform (i.e. ignored on Windows and MacOS)|
_returns: The path that R.NET found suitable as a candidate for the RHOME environment
Attempt to find a suitable path to the R shared library. This is used by R.NET by default; users may want to use it to diagnose problematic behaviors.
returns: The path to the directory where the R shared library is expected to be
Windows-only function; finds in the Windows registry the path to the most recently installed R binaries.
returns: The path, such as
Gets the platform on which the current process runs.
returns: The current platform.
@”P:System.Environment.OSVersion”‘s platform is not @”F:System.PlatformID.MacOSX” even on Mac OS X.
This method returns @”F:System.PlatformID.MacOSX” when the current process runs on Mac OS X.
This method uses UNIX’s uname command to check the operating system,
so this method cannot check the OS correctly if the PATH environment variable is changed (will returns @”F:System.PlatformID.Unix”).
Gets the default file name of the R library on the supported platforms.
returns: R dll file name
Gets the value, if any, of the R_HOME environment variable of the current process
returns: The value, or null if not set
Sets the PATH and R_HOME environment variables if needed.
|rPath||The path of the directory containing the R native library.|
If null (default), this function tries to locate the path via the Windows registry, or commonly used locations on MacOS and Linux|
|rHome|The path for R_HOME. If null (default), the function checks the R_HOME environment variable. If none is set,
the function uses platform specific sensible default behaviors.|
This function has been designed to limit the tedium for users, while allowing custom settings for unusual installations.
Is the platform a unix like (Unix or MacOX)