Rmd with code opens as blank in Notepad

I am using the current version of RStudio, and have a project with several Rmds that has worked fine till today.

Both the project and all but one of the Rmds open in RStudio absolutely fine.

One Rmd with 200+ lines of code in shows as a 4KB file, but opens as blank.

This would be OK if I could open the Rmd with Notepad and retrieve the contents - it's a text file, after all. But Notepad shows the file as blank, too.

I've seen plenty of queries here and on Stack Exchange about Rmds showing blank in RStudio, but none have mentioned not being able to read the file in Notepad.

(I also tried to open the file in Word - it came out as a single page of squares as 1 word. Even if the content is scrambled - how? - it doesn't seem enough for a 4KB file.)

This sounds like bad news :frowning:
Strongly recommend using git to provide you with version control/ backup generally to avoid dangers of total file loss in future...

The only alternatives I could offer is to try with Notepad++, it my be able to parse whatever data is in there. Or try to use readLines() in R to load the .Rmd into R itself. If that works, you can then save the file using writeLines()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.