Tomas Piskovsky
Tomas Piskovsky

Reputation: 31

Problem with opening scripts in updated version of R

I´ve updated R on my laptop from version 4.0.3 to version 4.2.0. When I try open some of my old scripts in Rstudio, it shows an empty window. Also when I download some script I have the same problem. It is interesting, that only one script works ok, so there isn´t any problem with installation of R or Rstudio. Could somebody help me? Thanks in advance.

Upvotes: 2

Views: 5035

Answers (1)

Paul Turner
Paul Turner

Reputation: 121

I think this is an encoding issue.

This worked for me (exact same problem with R 4.2.0 in Rstudio on Win11).

"Set the encoding by default to UTF-8:

  • Click on Tools (2nd option starting by the left on the top menu).
  • Choose Global Options.
  • An option box will appear. There choose "code" on the left menu. Under code, choose Savings and change the Default Text Encoding to UTF-8.

Now the files that were open as blank should appear with code."

See: https://github.com/ContinuumIO/anaconda-issues/issues/1609

Upvotes: 12

Related Questions