I use R in the terminal. I use an editor for writing the code but to test out parts of the script I use terminal as the scripts get written. Is there a way to get r session in the terminal to have R syntax highlight.
2 Answers
radian is a modern command line interface for R:
radian: A 21 century R console:
radian is an alternative console for the R program with multiline editing and rich syntax highlighting. One would consider radian as a ipython clone for R, though its design is more aligned to julia.
In R session, install colorout package with:
install.packages("devtools") devtools::install_github("jalvesaq/colorout") Add init code in ~/.Rprofile:
$ cat ~/.Rprofile invisible(colorout::setOutputColors) ref: https://github.com/jalvesaq/colorout
[troubleshoot]
If you get error Error in loadNamespace(name) : there is no package called ‘colorout’, then try to reinstall R(may not necessary), backup/remove ~/.Rprofile, then rerun install.packages("devtools") and following steps above.


vimornano.