Cannot Load RMD Files in Windows from R-Studio

I have a student that is experiencing some strange R-Studio behavior- they cannot open RMD files from the R-Studio File...Open... menu or use the load() command in the R-Studio console. They have to right-click on the file they want to open and then choose "Open With...", "R-Studio". I expect it's a Windows issue and am hoping that there is a known fix. I had them uninstall R-Studio and R and reinstall (both were fresh installs, not updates). They can create a new RMD file and save it to their user folder but then cannot open it. The error is "bad restore magic file number", "File 'XYZ.Rmd' has magic number --t". Any file they download or save from an e-mail attachment to their user folder or create new from R-Studio behaves in the same way. They are able to right-click on an RMD file, open in R-Studio, edit, knit and save-- but then must right-click to re-open or edit any saved file. I had them un-click the Save Workspace option in settings in case there was a corrupted workspace. I also made sure they were not saving or opening files from their downloads folder as I know there are permissions issues with Windows and accessing files from there from R-Studio. Please share any tips, settings changes to Windows or R-Studio that may help??

Hello,

This looks like a strange error indeed. Just to be clear, you're talking about R Markdown files (Rmd) and not RDS (R Data Serialization) files right?

The only other thing I could think of is that there's a corrupt settings folder that is not cleared out with a fresh install. If this is happening in a project, delete the .Rproj folder and open Rstudio again.

You can also try and delete the workspace folder in appsettings C:\Users\<YourUsername>\AppData\Local\RStudio-Desktop as this might not be removed automatically when reinstalling RStudio.

Hope this helps,
PJ