No R directory appears after installing R (But it is visible via the R installer)

Hey :slight_smile:

I've been using R and R Studio for many happy years until recently (on Windows, currently using Windows 10). I have now encountered a really bizarre and unusual installation issue that I'm unable to solve.

The problem started when I tried to install tidyverse. However, R went crazy after this and I got lots of package-related issues that wouldn't go away. I thought this might be because my R installation was on the D drive. So, for some reason, I decided to uninstall R and re-install the latest version as a fix on my C drive.

I then downloaded and installed the latest version of R (3.5.3). It ran right to the end, but came up with an error prompt: “Set up was unable to create the directory: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\R” as it already exists. I decided to navigate to this path manually via Windows Explorer, and there is nothing there. Even with view hidden files/folders enabled. The installer then ‘completed’.

The issue is that the R directory is now 'invisible'. The installer thinks that the directory is there under the 64bit Program Files folder on the C Drive (and is clearly visible when you are choosing a destination to install R). However, it does not appear when you navigate to that path via Windows Explorer. I checked the 32bit Program Files folder and it’s not there either.

The installer can also see previous R installation folders on the D drive that do not appear when you navigate to them via Windows Explorer. I cannot detect R anywhere on the computer. Even via the command line. Which makes me think it isn’t there… but the R installer thinks it is? Either that, or the installation aborts when it detects something in that Start Menu path. I can't delete this either, as it does not appear via command line or Windows Explorer.

The end result is that I cannot use R in any form. R studio asks me to point to the R installation on start up, which I can’t because it’s not there.

So, I’m really not sure what to do next... Any thoughts would be greatly appreciated.

Hi @Gbah,
Your situation sounds very frustrating.
When R is installed it writes changes to the Windows registry - this may be causing confusion for the installer.
I suggest you use Control Panel to uninstall all the versions of R on your machine (both C: and D: drives). Then reinstall the latest R version (R-3.6.3) on the C: drive without altering any of the defaults. Then reinstall RStudio (use all defaults). Then install tidyverse using the RStudio default user-library location which will be under your ~/documents/R/win-library/ directory.

HTH

Hi @DavoWW,

Thank you so much for your helpful response.
I suspect there are some registry issues going on... which frankly terrifies me :smiley:

So about the Control Panel un-installation method... this is what I tried initially (i.e. before this incident began). However, there was no version of base R that appeared in this list, which I thought was a bit odd. So to uninstall, I navigated to the R directory and ran "unins000.exe". I did this for the 2 versions of R that I already had on my D drive. For one version, it seemingly removed all the files. For the other, all the files appeared intact, despite me running the uninstaller. So, I followed the guidance of the 'R for Windows FAQ' and deleted the directory.

I suspect this is where the issue lies. I don't think that the uninstall was clean and there is something in the registry telling the R installer that it already exists, when it doesn't. Incidentally, I tried to install an older version of R today and received no error prompts or anything about R existing in the StartMenu\Program folder. This seemed promising, but once again, the installation directory is nowhere to be seen.

I'm sorry this sounds so convoluted!
If there are any further thoughts, that would be wonderful.

HI @Gbah,
It sounds like you have made some progress.
Are you seeing an R icon on your desktop, similar to this?
R_icon
If so, you can right-click on it and under "properties" you will see the target directory (i.e. where that version of R is installed).
HTH

Hi @DavoWW,

Even though the installer for the old version ran without errors, there is no sign of R or the install directory anywhere. R Studio is unable to automatically detect the presence of R and when I navigate to where it should have installed, the directory is not there (the 64 bit C:\Program Files folder).

There's nothing anywhere else either... I had a look in the Program Data/Start Menu folder where it asked to create a shortcut during the install, but there is nothing. I also looked in the registry where R is supposed to make additions, but there is no sign of it.

It's almost as if the installer completes and then R and all its associated files disappear into the aether :frowning:
The end result is that I cannot do anything R-related on this computer anymore.

I really appreciate your advice, though I fear this is one mystery I may never solve.

Progress!

The installer still fails to produce a directory anywhere...

So I downloaded and installed a version of R on a different device and copied the directory over to this computer. This directory is clearly visisible and I can navigate to it, via RStudio.

So... although R Installers don't work on this computer anymore, I can copy the directory over from another device. So, I at least have found a workaround.

Thank you so much for all the input on this thread :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.