This is the default for when ProgramFiles isn't set. Windows
operating systems should always have that environment variable set, so
the default is probably only useful when you're testing the script on
a non-Windows system.
def get_r_bin_directory():
"""Locate the R bin directory (if R is installed
"""
- pf = os.environ.get('ProgramFiles', r'c:\ProgramFiles')
+ pf = os.environ.get('ProgramFiles', r'c:\Program Files')
bin_glob = os.path.join(pf, 'R', 'R-[0-9]*.[0-9]*.[0-9]*', 'bin')
version_re = re.compile('^R-(\d+)[.](\d+)[.](\d+)$')
paths = {}