The console is where you interact with R. R code can be sent through a selection from an R file using CTRL+R or CTRL+Enter, or by writting it directly in the console.
The console is designed to be as simple as possible:
- Works with 3 colors: blue (input), black (output) and red (error) ;
- No autocompletion.
Some information messages are sent by R with the error channel and then printed in red in the console of RCode.
On the top right menu, there are the following actions:
- Restart R starts a new session of R ;
- Clear console (CTRL+L) clears the output of the console ;
- Stop current command (CTRL+Q) stops the current execution of R code (for example, stopping an infinite loop) ;
- Source a file for selecting an R file to execute ;
- Set working directory for selecting a new working directory, which is displayed at the top of the console ;
- Change R path opens the menu in order to connect another R (for example, another version).
In the top left menu, R -> Quick RData save will save the current R session, whereas R -> Quick RData load will load the R session saved. Theses features are accessible with the shortcuts at the top right of RCode.
When testing something that changes the R environment, you can quick save before, do the tests, and reload the environment at the previous state.