I have a weird problem. I have written some scripts in R using R-Studio and saved them as .R files. However, when I try to open the .R file with R-Studio I only get an empty sheet without any code. When opening the .R file with an Edtior you can see the code. I have attached a screenshot where you can see the problem. Do you have any idea, why this is happening and how I can avoid this? I'd appreciate every comment.
Update: I also found out, that RStudio most often does not save the code in the .R file. Sometimes it works and the code is saved in the .R file and sometimes it does not save anything and the resulting .R file has a size of 0 in the file explorer and when opening it any editor there is no content.
This is really strange. You you have any idea what it causing the problem? I forgot to mentione that I use R Studio by using Anaconda