Problem with opening scripts in updated version of R - 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.

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

Related

Why is indentation different in editor and terminal with VSCODE?

After updating VSCODE to the latest version, the editor and the terminal show different indentation. Following figures present the format of the code in the editor and terminal, respectively.
Code in editor
Code in terminal
How can I keep the same indentation?
This problem is triggered by radian's auto-indent and can be solved by adding following code to the profile of radian.
options(radian.auto_indentation = FALSE)

Cannot soft wrap R source files in R studio

I'm having trouble soft wrapping .R source files in the text editor in Rstudio Version 1.4.1717. I have tried to follow advice given online but it dosn't seem to change anything on my screen. It seems it should be fairly simple using the advice here:
Disable horizontal scroll in the Source of RStudio
and here:
wrap code in R Studio text editor
I have tried various things like ticking and unticking "soft wrap R source files check box", selecting all text in the text editor before re-trying, closing and restarting Rstudio etc...but still doesn't seem to work. I'm not sure if I'm missing something really obvious?!
Update: I managed to get it working if I start a new file (File > New File > R script). Please see here:
R studio image
However, this does not seem to work for R scripts that I had already created. The bottom right of the source window, does indeed say "R Script".
Update 2
I managed to get this working if I copy pasted the entire R script to a new file ((File > New File > R script), as opposed to re-saving the current file as a newer version (using File > Save As...")
When I went to save the file, a pop-up box appeared which asked me "Choose Encoding" for which I selected the default. I wonder if the previous file had a different encoding which meant the text wrapping could not work properly? Strangely, much earlier versions of the file did NOT have any problems when when using the wrap text functionality. So it seems that something happened to one of the recent versions that is causing the issue.
Do you remember to click apply before the ok button after checking the box?
You need not restart RStudio to get the change effected.

Font in R console toolbar and menus is no longer correct after installing R 4.1.0

I just installed R 4.1.0 (in French). On start of the console, the font in the console toolbar and menus is not correct (but the font displayed in the scripts are ok). Accents are replaced by incorrect characters. For example, "Préférences" becomes "Pr�f�rences". What happened? Thanks in advance.

How can I use a proper arrow instead of a <- as an assignment operator in RStudio? [duplicate]

I looked at Fira Code and I wanted to try it out with one of the listed supported editors. So I launched RStudio (Version 0.99.491 on a Win box) and set the font to Fira Code but ... nothing. So how to enable font ligatures in RStudio?
EDIT: The trick in the accepted answer below still works for RStudio Version 1.0.44. I still wish there's a simple button to enable it.
I still wish there's a simple button to enable it.
Wish granted! We've just added this to RStudio 1.1.
You can try the preview release here:
https://www.rstudio.com/products/rstudio/download/preview/
RStudio now have a build in option for ligatures, you do not need these dirty hack any more, cheers!
[OLD CONTENTS]
Close RStudio
Open [RStudio dir]/www/index.htm (If you are using a Linux distribution, the dir may be /usr/lib/rstudio, thanks for the comment of #CosminSaveanu)
Add following code between <head> and </head>:
<style>*{text-rendering: optimizeLegibility;}</style>
Restart your RStudio.
dirty but works.
If you are using Linux then type in your Terminal,
sudo apt install fonts-firacode
Restart Rstudio then in Tools / Appearance / Editor Font: choose Fira Code and Apply.

Aptana Studio 3 CSS folding

Css code folding doesn't seem to be there any more Aptana Studio 3, build: 3.0.2.201106082310.
I have checked the preferences under 'Aptana', 'Editors', 'CSS' and 'Enable Folding' has a tick in it.
Folding works fine for JS but seems to have dissappeared under CSS, intellisense still works fine.
I used to get a little '-' or a '+' symbol in the left column alongside the line number.
Anybody else found this problem, its a great tool and would like to be able to use it again.
It's definitely still available, as I can see it in 3.0.2 or 3.0.3.
It might be that your code has a parse error or some similar problem that's causing the ticks not to show, though that would be odd if it happens to all files.
If it is a single file, I would file a bug here. Otherwise, you might check Help > Studio > View Log File to see if there are any error messages, or try updating to the latest beta version, 3.0.3 (docs on the wiki)

Resources