My .Rprofile

Most important thing: set the history size to something outrageously large. Also, increase the max.print size, set the editor to vim.

The colorout package cannot be found on CRAN, because it modifies parts of R that are not supposed to be touched by CRAN packages. However, it provides a rudimentary syntax highlighting in the standard R output, a bit like the one found in RStudio. setOutputColors is a colorout function for setting the desired colors.

setwidth allows to automagically adapt the width of the output to the width of the text terminal used. Very useful.

myfuncs is a package that contains my own functions, slapped together. I want them to have in every R session that I’m running interactively.

timestamp from the utils package is called at each start of an interactive session; it provides a neat comment in the history indicating time and date of when the session was started.

options( digits.secs = 3 )
options( editor= "vim" )
options( max.print= 2000 )
Sys.setenv( R_HISTSIZE= 1048576 )

if( interactive() ) {
  require( colorout )
  try( setOutputColors(normal = 0, number = 2, string = 1, const = 5 ) )
  require( setwidth )
  require( myfuncs )
  require( pca3d )