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 do a lot of work from mysql databases, so connecting right away is a godsend. I only wish there was a way of listing the avaialble databases so I wouldn't have to remember all the different names.
Here's mine. Nothing too innovative. Thoughts on why particular choices:
stringsAsFactors
because I find it extremely draining to pass it as an argument each time I read a CSV in. That said, it has already caused me some minor vexation when using code written on my usual computer on a computer which did not have my .Rprofile. I'm keeping it, though, as the troubles it has caused pale in comparison to the troubles not having it set everyday used to cause.utils
package beforeoptions(error=recover)
, it cannot find recover when placed inside aninteractive()
block..db
for my dropbox setting rather thanoptions(dropbox=...)
because I use it all the time insidefile.path
and it saves much typing. The leading.
keeps it from appearing withls()
.Without further ado:
Here is mine. It won't help you with the coloring but I get that from ESS and Emacs...
Mine is not too fancy:
Here's a little snippet for use exporting tables to LaTeX. It changes all the column names to math mode for the many reports I write. The rest of my .Rprofile is pretty standard and mostly covered above.