Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rstudio loading workspace failed [closed]

Tags:

r

rstudio

When I want to work with Rstudio , I get an error

“bad restore file magic number” error in R

enter image description here

I tried to do research on the internet to solve the problem but it does not work

Any idea please !!!

like image 902
Majdi Taleb Avatar asked Jun 13 '26 06:06

Majdi Taleb


1 Answers

It seems as if R tries to automatically load a previously saved workspace that's corrupted. Take a look at your home directory and check if you can locate the .RData file. Delete that one and the problem should go away.

On Windows that's most likely in the folder:

C:/Users/YourUserName/Documents

Remember that the file is only the extension .RData and is -depending on your settings- sometimes automatically saved by both R and RStudio. (depending on your settings it might ask to save the workspace on exiting, do so without asking or don't do it at all. see also ?quit)

Because it's only an extension, on Windows it will be a hidden file. In order to be able to see and delete it, change your Windows settings so you can see hidden files.

like image 139
Joris Meys Avatar answered Jun 16 '26 22:06

Joris Meys



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!