I have been working on a package for a few months. Everything has been going fine, however now when I try to select the .Rproj file from R studio to edit the files assosciated with the packages, R becomes unresponsive to the point where I can't even quit the session, I have to force close it through the windows task manager. Furthermore, none of the files assosciated with the package (description, vignettes, data etc.) show up in the files viewer within the project.
Some wild guesses/questions.
- Is there a .git folder in your project folder?
- Can you copy the entire project folder, and in the copy, delete .Rproj.user then click on .Rproj to see if you can open the project?
- Maybe updating RStudio is a good idea? (maybe not)
- No git folder as the package is just designed for local use/internal distribution. Not for github. There is a .gitignore folder
- I tried updating RStudio and no joy
- To your second suggestion, Sorry, I'm confused as to what you mean. I don't seem to have a .Rproj.user file, nor do I ever recall havng one, just a .Rproj file
If I open a folder in my file viewer (outside of RStudio) I see the .Rproj file and the .Rproj.user folder.
See point 2 in https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects "Creates a hidden directory (named .Rproj.user) where project-specific temporary files (e.g. auto-saved source documents, window-state, etc.) are stored. This directory is also automatically added to .Rbuildignore, .gitignore, etc. if required."
I was thinking, maybe that folder, or .Rhistory
, might be causing problems (wild guess). I recommend trying deleting .Rproj.user and .Rhistory in a copy of your folder (especially as you don't have the safety of version control), and trying to open the .Rproj from there.
I think there's benefit in learning git even for internal stuff but that's a topic for later/another day of course!
In my file viewer outside of Rstudio I can't see a .Rproj.user folder, strange.. I tried deleting .Rhistory and unfortunately still no luck..
Just to be sure, can you make sure you'd see hidden folders if there were some? .Rproj.user is a hidden folder. https://support.microsoft.com/en-us/help/4028316/windows-view-hidden-files-and-folders-in-windows-10
Thanks for all your advice Maelle, strangely enough, I restored a file I had created which documented one of the datasets attached to the package (as this is the only file I had attempted to edit since the package stopped working). Somehow, this fixed the problem. I still am not sure why (Maybe a glitch?) But anyway, i'm not going to question it too much and just be glad it's working again
Indeed, awesome!! Have fun packaging now!