INNER CODE UNIT · Python
_get_rlib_path
briscverse/ryp · ryp.py:38
def _get_rlib_path(R_home: str) -> str:
"""
Get the path to the R shared library.
Based on the rpy2.situation.get_rlib_path() function.
Args:
R_home: the path to the R home directory
Returns:
The path to the R shared library.
"""
system = platform.system()
if system == 'Darwin':
return os.path.join(R_home, 'lib', 'libR.dylib')
elif system == 'Windows':
return os.path.join(
R_home, 'bin', 'x64' if sys.maxsize > 2 ** 32 else 'i386', 'R.dll')