I have always found startup profile files of other people both useful and instructive about the language. Moreover, while I have some customization for Bash and Vim, I have nothing for R.
For example, one thing I always wanted is different colors for input and output text in a window terminal, and maybe even syntax highlighting.
I hate to type the full words 'head', 'summary', 'names' every time, so I use aliases.
You can put aliases into your .Rprofile file, but you have to use the full path to the function (e.g. utils::head) otherwise it won't work.
EDIT: to answer your question, you can use the colorout package to have different colors in the terminal. Cool! :-)
Here are two functions I find handy for working with windows.
The first converts the
\
s to/
.The second opens the working directory in a new explorer window.
I set my lattice color theme in my profile. Here are two other tweaks I use:
Although I don't actually have that in my .Rprofile, because it might breaks my coauthors' code, I wish it was the default. Why?
1) Character vectors use less memory (but only barely);
2) More importantly, we would avoid problems such as:
and
Factors are great when you need them (e.g. implementing ordering in graphs) but a nuisance most of the time.
I like saving my R command history and having it available each time I run R:
In the shell or .bashrc:
in .Rprofile:
Most of my personal functions and loaded libraries are in the Rfunctions.r script