When I want to work with Rstudio , I get an error
“bad restore file magic number” error in R

I tried to do research on the internet to solve the problem but it does not work
Any idea please !!!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With