RStudio empty on startup - No windows, no menus, no rendering - r

When I start RStudio, none of the windows inside the main frame come up, and none of the menu options display menu options when clicked. It's just an blank page.
It feels like some kind of graphics rendering or window management problem.
I'm running Windows 7. I have the latest version of R, which is 3.1.1. I have the latest RStudio, which is 98.1062.
How to fix it?

Reset the RStudio state. Do this:
Close RStudio if open.
Go to this directory: %localappdata%\RStudio-Desktop
Rename that directory as a type of backup.
Start RStudio.
RStudio will see the configuration directory is missing and regenerate it with correct values.
Everything should work after that.
Other threads I found helpful here are:
https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-s-State
https://support.rstudio.com/hc/communities/public/questions/200666647-RStudio-096-16-Windows-7-gives-empty-screen?locale=en-us
Thanks!

Renaming the RStudio state by renaming %localappdata%\RStudio-Desktop did not work for me. However i made it work by renaming another config folder in %appdata% instead.
Close RStudio
Go to this directory: %appdata%\RStudio
Rename the folder
Restart RStudio

I faced the same issue when I downgraded my version of R.
I did try the above solutions. However, it didn't work for me.
After some googling, I found out that the issue was because now I had a different version of R installed. Here's how you can choose the version of R and rectify the issue.
Navigate to the RStudio installation folder. (C:\Program Files\RStudio\bin)
Press and hold Control Key
Double click on rstudio.exe
Choose a specific version of R (whichever you want to work with)
Click OK and RStudio should open without any issues.
NB: I use 64bit Windows 8.1.

I had the same issue and I almost gave up about solving it but then I found a suggestion that GitHub might be the problem. I am not sure how that is happening but the minute I uninstalled GitHub and re-launched Rstudio, it worked perfectly as nothing happened!? Here is the link for where I found the suggestion on Rstudio community page: (https://support.rstudio.com/hc/communities/public/questions/200983187-R-studio-0-98-797-for-mac-opens-as-blank-white-page)

I had the same problem and figured out that for some reason R was blocked on the step of loading my library from a website (I added it to Rprofile for auto-load). You can test the following:
1) Try to run just R console, not RStudio, and then click on blank space - normally some information should appear
2) Try to launch without network connection

On a Mac (Running Yosemite 10.10.3) this is what worked for me:
Move/Rename ~/.rstudio-desktop
(Many responses have mentioned this, but this by itself didn't help.)
Then I shutdown my Mac and restarted it. RStudio worked when I logged back in.
Before that, I tried every one of the steps mentioned here and in many other links, including re-downloading R and RStudio, but unfortunately none of those steps helped in my case.

Search this documentation for 'Blank GUI'.
This is what I found which worked for me:
In Windows Explorer, go to C:\Users\currentUser\AppData\Roaming\RStudio.
Delete the Desktop.ini file
This technique forces RStudio to refresh and default to open-source R as the engine

Same issue I faced so I unistalled the windows installer and downloaded zip version from this link https://www.rstudio.com/products/rstudio/download/
Unziped It and pasted it into c drive and created shortcut from Rstudio/bin/rstudio.exe file.
Working properly after that no issue. In windows installer checked that r session is not working due to an missing dll.
So try to install from ZIP

I had the same problem like Thomas
When I start RStudio, none on the windows inside the main frame come up, and none of the menu options display menu options when clicked. It's just an blank page.
My problem was, that i uninstalled R because is thought RStudio will work on its own.
So i uninstalled RStudio and deleting every existing file which was created by R or RStudio.
In the next step i installed RStudio again.
It was asking for a Version of R (which i dont had in this state). So i installed R again and everything is working fine now. I hope this helps

I had a slight variation of the problem that might be of interest. I had set up an aliases.cmd to run my cygwin bash shell automatically upon launch of a cmd terminal as per:
https://superuser.com/questions/302194/automatically-executing-commands-when-a-command-prompt-is-opened
What RStudio was doing was launching a few cmd windows in the background to (I assume) populate each pane and the console.
This was triggering a bash shell which wasn't returning and was hanging RStudio.
If you have this issue you can just manually kill the sub bash terminals spawned by cmd via ProcessExplorer/TaskManager and RStudio will continue to launch normally.
If anyone else has set anything to launch automatically on init of a cmd terminal then this could interfere in the same way with RStudio.
The RStudio devs could probably fix this behind the scenes by changing the way they spawn cmd terminals in the gui.

I had a similar problem. After trying the options above with no luck, I uninstalled Rx64 3.5.0 and installed an older version, R x64 3.2.2.
Rstudio then worked perfect.

Related

After updating R the code is not displayed anymore

So, I updated R using the installr package in the Rgui. Now I face two problems:
My previously written code is not displayed anymore - the file is not empty, I checked it by opening the file with the editor. Opening the file by regular double clicking (RStudio is default application) as well as open the file within Rstudio by using File -> Open File -> Filename did not help. It does open the file but shows it as an empty file (no code is displayed).
When loading packages, I get the request for updating my RStudio. But when I use the taskbar (Help -> check for Updates) it says, that the RStudio uses the newest version.
After updating I also restarted my computer, which did no help. I also checked if the newest version is actual in use as suggested in the following post Mismatch Versions.
Any idea what I am doing wrong and how to display the code again? Thanks!
Update: The problem was solved by installing the newest RStudio version directly from their website.
Meanwhile, I found the solution - the true root of the problem was in fact an old version of RStudio. Besides in RStudio it was declared as the newest version, here it was mentioned that these statements are not always correct.
Downloading the newest version directly from the RStudio website solved the problem.

R plot doesn't work on my Windows, but plot.default does

I'm taking a course in R and I've hit a road block on day one.
Typing:
demo(graphics)
...should start a series of graphs being displayed on screen. On my Windows 10 (64 bit) new Dell laptop, I get a persistent error:
The execution is stopped after the red lines, seemingly because the demo(graphics) call is being made with incompatible parameters. In blue I make the same call but use the default function and an empty plot is displayed.
I have tried uninstalling and reinstalling everything, installing through Anaconda and from the CRAN website. The same error persists. I've even tried with mro instead of basic R.
I don't see any similar error messages in my class or on Google. My guess is that I need to install a particular version of R and RStudio make it work but I'm guessing.
Can anybody offer some expertise?
I'm running R version 3.6.1 (2019-07-05) (which is executing code correct, just not the demo call) and RStudio Version
Running the basic Rgui software from the command line with the --vanilla parameter like so:
Rgui --vanilla
Opened Rgui and the
demo(graphics)
...call worked.
This meant that the issue was in the .Rprofile file. This is found in the etc folder of the basic R installation and when I checked, it looked absolutely fine (entirely commented out actually).
I wanted to use RStudio though, so I investigated the RStudio docs and saw that each project is given its own .Rprofile style initialization file when a new project is created.
So I created a new project with RStudio and by creating a new project whatever configuration issue was causing the error was completely fixed.
Credits to G. Grothendieck for the answer in the comments.

How do I open an r script (.R file) in RStudio by double-clicking it in windows

When I double click an R script (.R file) in order to open and edit it, nothing happens.
I expect it to open it in either R or RStudio but it doesn't.
I found a similar (old) question (Opening a .R file via a double click (Windows)) but the solution doesn't work for me.
I have tried:
- right-clicking and explicitly telling it to open it with RStudio
- set it as the default program to associate with this file type
- drag the script into RStudio
Anyone any idea whether it is Windows or R(Studio) related?
Running:
Windows 10 Pro
R version 3.6.1
RStudio version 1.2.1335
As the first comment suggest, it is likely a problem occuring while installing R or Rstudio. This would most likely be fixed by reinstalling Rstudio. If it doesnt i'd suggest checking out this Rstudio question.
Basically, you can manually create using the command prompt (start -> "cmd" -> enter), using
assoc .R=rfile
Ftype rfile="C:\Program Files\RStudio\bin\rstudio.exe" %1
changing the rstudio directory to the correct directory for your computer.
A less command-prompty solution might be available by following the steps described in this guide. However i did not test the latter approach.

Building Tools are missing in RStudio

First of all, I am working on a Mac. I am trying to install Blotter from GitHub. I found several descriptions of how to do that but my RStudio tells me that I am missing Building tools and gives me a link (https://www.cnet.com/how-to/install-command-line-developer-tools-in-os-x/) where it is described to do that. So far so good. I downloaded Xcode and the command line tools for Mac and installed those. Nothing changed even after restarting R. Then I found this https://cran.r-project.org/bin/macosx/tools/. I installed it and during that, it told me that I had to do the following
"This package will install clang 6.0.0 for OS X 10.11 (El Capitan) or higher with OpenMP support in /usr/local/clang6
In order to use this compiler you have to add /usr/local/clang6/bin to the PATH environment variable such as
export PATH=/usr/local/clang6/bin:$PATH"
So I changed the environmental variable path as follows http://blog.tonytsai.name/blog/2018-05-07-setting-path-variable-for-gs-command-in-rstudio/.
How I changed the PATH variable.
Again I restarted R but still, nothing changed. I still get the notice that the building tool is missing.
Somehow it seems to me that I installed everything correctly but R doesn't recognize the Programmes. Does anyone have an idea? I tried to search for settings to tell R that I installed the command line tool but couldn't really find anything helpful.
Ok, a bit of an update.
Best I can see it that Blotter is built and stored on R-Forge packages under a package called RStrategist
In R console type/cut & paste this.
install.packages('RStrategist',repos='http://R-Forge.r-project.org')
See R forR-Forge for more details. Once this has been installed run instead.
library(RStrategist)
Unfortunately, I am not willing to install this package and see if it works mainly because 1) don't need it nor know how to use it, 2) not sure how good packages are from R-forge, though it seems legit, but, this brings me back to point one.
So before i read the updated answer of Conrad Thiele i was trying around bit. Basically i deleted R, R Studio, Xcode and Command Line tools. Then i installed Xcode, Command Line tools, R and RStudio. Then i followed the notice on https://cran.r-project.org about the tools and installed both stated tools. As mentioned in the original question the Clang package tells you to change the Environmental Variable. And there was the mistake i believe. I originally simply pasted "PATH=/usr/local/clang6/bin:$PATH" into the the ".Renviron" file. With reading up online i noticed that "export PATH=/usr/local/clang6/bin:$PATH" is actually a Command for the Mac Terminal. After executing it, it sill didn't work but then i remembered that i still had the Path "PATH=/usr/local/clang6/bin:$PATH" in the the ".Renviron" file. Once i deleted that it worked. So i guess the key was that with changing the Environmental Variable correctly R found the connection with the right tool. Patients paid off.

RStudio is blank when opened

I have just installed the latest versions of R (3.1.0) and Rstudio (v0.98.507) on a Windows 7 machine, 64 bit.
The R GUI works OK, but when I open the RStudio.exe only a blank window opens. I've tried re-installing R and RStudio.
Any suggestions?
By choosing the R version I wanted to use I was able to use Rstudio again.
To choose the R version you want to use with Rstudio do the following;
Click the CTRL key (don't let go)
Click on the Rstudio icon
Choose the version you want in the pop-up window.
For Ubuntu users where #neal's solution doesn't work.
$ rstudio --no-sandbox
related to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468
Download the 64bit version and reinstall it.
The same for Linux
FOR LINUX: this happens to me on cloud instances. A solution is forcing software rendering of RStudio. You need to start RStudio, get to the black screen, close Rstudio black screen, do my solution below in the terminal with Rstudio closed, then start Rstudio again.
In terminal:
sudo nano ~/.config/RStudio/desktop.ini
APPEND THE FOLLWING TO [General] section (leave whatever is there and add the line below):
[General]
desktop.renderingEngine=software
Again this is for Linux, but there may be a similar issue in Windows and you may be able to force software rendering.
Press down Ctrl key and then click on RStudio icon to launch. A dialog box asks you about the R version. Choose the one that actually exists (you might see an R version which does not exist; confusing RStudio)
For Windows10 64bit.
After following the hold Ctrl and clicking RStudio icon.
Change the Rendering Engine: to Software.
This fixed the problem on my machine.

Resources