I just replaced an older version of RStudio with RStudio-2022.02.2-485. R code is now not visible in the IDE when opening .R script. Rereading the file using (non-default) UTF-8 encoding solves the problem, but this still seems strange. This appears to be similar to an older closed issue mentioned here: Latest RStudio not showing R scripts and deleteing files... - #4 by grosscol.
I have the very same problem! Only the blank script is shown after the installation of the newest version of R + RStudio, although the file is definitely not empty (it has non-zero size and it is openable in e.g. Notepad).
In the most recent (2022.02.2 Build 485) RStudio pulldowns have you tried File -> Reopen with Encoding...-> UTF-8 encoding?
Yes, I've tried this and it kinda helps, but then I lose all characters with diacritics in my notes (# blahblah) so it's no longer meaningful or readable...
This solution worked for me. Thanks a lot.
I think you're seeing this issue: R 4.2: Document unexpectedly opens as empty in some cases · Issue #11206 · rstudio/rstudio · GitHub
We have a fix in our daily builds if you're willing to try:
Opening of code docs appears to work now in default ISO-8859-1 for RStudio
2022.06.0 Build 412.
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.