There are many text editors used to edit R scripts. I personally prefer to use open-source editors (I have mentioned the R editor on RFAQ_cn ). Here we will mainly introduce gedit, a text editor in the GNOME desktop environment under Ubuntu. Although geidt looks as simple as notepad in Windows, it is enough to run general R scripts because the gedit editor can run R Code directly as external commands. Implementation
There are many text editors used to edit R scripts. I personally prefer to use open-source editors (I have mentioned the R editor on RFAQ_cn ). Here we will mainly introduce gedit, a text editor in the GNOME desktop environment under Ubuntu.
Although geidt looks as simple as notepad in Windows, it is enough to run general R scripts because the gedit editor can run R Code directly as external commands. The specific implementation method is as follows:
Select "edit"> "Preferences"> "plug-in"> "external tools" (execute External commands and Shell scripts)
Create a new tool R, write R-no-save-no-restore-q in the command, and write the description and shortcut key (ctrl + r is defined here ).
You can select "selected area" and "select all" for the input. For the output, "display in the lower panel" is better. Of course, this depends on your preferences.
When editing the R code, select the code to be executed, ctrl + r, OK, and output the result, which is very convenient.
From: http://www.bjt.name/2009/07/ubuntu-r-scrip-gedit/