How to change the default text editor in R when on Linux?

I program using R on Linux, and every time I want to edit a function by typing

fix(FunctioName) 

The VI editor is used, and for me it is not so convenient, I want to change it and make it different, for example, nano. I connect to our school server, so I only have a shell, no graphical interface.

Thanks in advance.

+4
source share
2 answers

As always, export your desired editor to $EDITOR or $VISUAL before starting.

+4
source

Or in R, to override the environment variable:

 options(editor = "nano") 
+4
source

All Articles