R user interfaces
R’s default user interface
R console
Command prompt
>
For interactive data analysis: type in commands, hit Return key and get text output as a result.
[1] 8
Comments start with #, they are not executed as a command
9 * 3 # this is a comment
[1] 27
- Copy and paste to and from the clipboard as usual (Windows:
Ctrl+c and Ctrl+v)
- Interrupt R with
ESC (on Windows) or Ctrl+c (Linux)
- Quit with
q()
- Save a protocol of your commands and the output with
sink("fileName.txt", split=TRUE)
Non-interactive use
For batch mode:
Rscript.exe input.r
Rterm.exe --no-restore --no-save < input.r > output.txt
Get and set options
[1] 75
Change option, save previous value, and restore previous value
op <- options(width=70)
options(op)
Also see help(Startup) for files controlling the startup options.
Contributed user interfaces to R
Compared to the standard user interface that is already included with R, there are several better alternative options.
For working with R commands
- RStudio integrated development environment (IDE): Cross platform (Windows, MacOS, Linux), great support for the workflow for these posts, my preferred choice
- Positron integrated development environment (IDE): Cross platform (Windows, MacOS, Linux), great support for the workflow for these posts, my preferred choice
- Eclipse IDE with StatET plugin: Cross platform (Windows, MacOS, Linux), powerful, visual debugging support
- Bio7 another customization of the Eclipse IDE for working with R
- Emacs / XEmacs text editor with Emacs Speaks Statistics add-on: Cross platform (Windows, MacOS, Linux), very powerful, hard to learn
Graphical front-ends for R functions
- Jamovi: Graphical statistical spreadsheet based on R
- RKWard: Graphical user interface to R: Linux and limited Windows support
Get the article source from GitHub
R markdown - markdown - R code - all posts